cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <html>
<head></head>
  <body>
    <div class="container">
      <div class="boombox">
        <div class="lights"></div>
        <div class="lines"></div>
        <div class="speaker"></div>
        <div class="speaker"></div>
      </div>
      <div class="shadow"></div>
    </div>
  </body>
</html>
            
          
!
            
              @keyframes music {
  0% {
    -moz-box-shadow: 0 0 0 0 rgba(102, 102, 102, 0.4);
    -webkit-box-shadow: 0 0 0 0 rgba(102, 102, 102, 0.4);
    box-shadow: 0 0 0 0 rgba(102, 102, 102, 0.4);
  }
  70% {
    -moz-box-shadow: 0 0 0 30px rgba(102, 102, 102, 0);
    -webkit-box-shadow: 0 0 0 30px rgba(102, 102, 102, 0);
    box-shadow: 0 0 0 30px rgba(102, 102, 102, 0);
  }
  100% {
    -moz-box-shadow: 0 0 0 0 rgba(102, 102, 102, 0);
    -webkit-box-shadow: 0 0 0 0 rgba(102, 102, 102, 0);
    box-shadow: 0 0 0 0 rgba(102, 102, 102, 0);
  }
}

@keyframes dance-and-bounce {
  0% {
    -moz-transform: rotate(0deg) translateY(0px);
    -webkit-transform: rotate(0deg) translateY(0px);
    transform: rotate(0deg) translateY(0px);
  }
  16.6% {
    -moz-transform: rotate(0deg) translateY(-20px);
    -webkit-transform: rotate(0deg) translateY(-20px);
    transform: rotate(0deg) translateY(-20px);
  }
  33.2%{
    -moz-transform: rotate(0deg) translateY(0px);
    -webkit-transform: rotate(0deg) translateY(0px);
    transform: rotate(0deg) translateY(0px);
  }
  49.8%{
    -moz-transform: rotate(-10deg) translateY(0px);
    -webkit-transform: rotate(-10deg) translateY(0px);
    transform: rotate(-10deg) translateY(0px);
  }
  66.4%{
    -moz-transform: rotate(0deg) translateY(0px);
    -webkit-transform: rotate(0deg) translateY(0px);
    transform: rotate(0deg) translateY(0px);
  }
  83%{
    -moz-transform: rotate(10deg) translateY(0px);
    -webkit-transform: rotate(10deg) translateY(0px);
    transform: rotate(10deg) translateY(0px);
  }
  100%{
    -moz-transform: rotate(0deg) translateY(0px);
    -webkit-transform: rotate(0deg) translateY(0px);
    transform: rotate(0deg) translateY(0px);
  }
}

@keyframes click {
  0%, 25%, 50%, 75% {
    background-color: #7ff0fd; 
  }
  100% {
    background-color: #103950; 
  }
}

@keyframes change-background {
  0% {
    background: #16a085;
  }
  25% {
    background: #1abc9c;
  }
  50% {
    background: #9b59b6;
  }
  75% {
    background: #8e44ad;
  }
  100% {
    background: #16a085;
  }
}

@keyframes shadow {
  0% {
    left: -25px;
    width: 275px;
    background: #11806a;
  }
  16.6% {
    left: 25px;
    width: 200px;
  }
  25% {
    background: #14967c;
  }
  33.2%{
    left: -25px;
    width: 275px;
  }
  50% {
    background: #7c4791;
  }
  75% {
    background: #71368a;
  }
  100% {
    background: #11806a;
  }
}

body{
  background-color: #ccc;
  -moz-animation: change-background 2s infinite;
  -webkit-animation: change-background 2s infinite;
  animation: change-background 2s infinite;
  -moz-animation-delay: 2s;
  -webkit-animation-delay: 2s;
  animation-delay: 2s;
}

.container {
  position: fixed;
  top: 50%;
  left: 50%;
  -moz-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.boombox {
  position: relative;
  width: 200px;
  height: 120px;
  border: 12px solid #103950;
  -moz-border-radius: 18px;
  -webkit-border-radius: 18px;
  border-radius: 18px;  
  background-color: #fff;
  -webkit-animation: dance-and-bounce 2s infinite;
  -moz-animation: dance-and-bounce 2s infinite;
  animation: dance-and-bounce 2s infinite;
  -moz-animation-delay: 2s;
  -webkit-animation-delay: 2s;
  animation-delay: 2s;
  z-index: 2;
  
  &:before, &:after{
    content:'';
    position: absolute;
    width: 150px;
    border: 10px solid #103950;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
  }
  
  &:before {
    top: -48px;
    left: 16px;
    height: 10px;
    background-color: #ffcf54;
    border-bottom-width: 8px;
  }
  
  &:after{
    border-top: 0;
    height: 15px;
    top: -26px;       
    left: 16px;
  }
  
  .lights {
    position: absolute;
    top: 10px;
    left: 38px;
    width: 12px;
    height: 12px;
    background-color: #7ff0fd;
    -moz-border-radius: 50px;
    -webkit-border-radius: 50px;
    border-radius: 50px;
    -moz-animation: click 1s 1s;
    -webkit-animation: click 1s 1s;
    animation: click 1s 1s;
    
    &:before, &:after {
      content: '';
      position: absolute;
      width: 12px;
      height: 12px;
      -moz-border-radius: 50px;
      -webkit-border-radius: 50px;
      border-radius: 50px;
    }
    
    &:before {
      background-color: #ffcf54;
      left: -20px;
    }
    
    &:after {
      background-color: #7ff0fd;
      left: 20px;
    }
  }
  
  .lines {
    position: absolute;
    border: 2px solid #103950;
    width: 90px;
    top: 18px;
    left: 90px;
    
    &:before{
      content:'';
      position: absolute;
      border: 2px solid #103950;
      width: 90px;
      top: -10px;
      left: -2px;
    }
  }
  
  .speaker {
    position: absolute;
    border: 15px solid #7ff0fd;
    -moz-border-radius: 100px;
    -webkit-border-radius: 100px;
    border-radius: 100px;
    -moz-box-shadow: 0px 0px 0px 10px #103950;
    -webkit-box-shadow: 0px 0px 0px 10px #103950;
    box-shadow: 0px 0px 0px 10px #103950;
    height:30px;
    width:30px;
    left: 20px;
    top: 40px;
    
    &:last-child {
      left: 120px;
    }
    
    &:before{
      content:'';
      position: absolute;
      -moz-border-radius: 100px;
      -webkit-border-radius: 100px;
      border-radius: 100px;
      -moz-box-shadow: 0px 0px 0px 0px #fff;
      -webkit-box-shadow: 0px 0px 0px 0px #fff;
      box-shadow: 0px 0px 0px 0px #fff;
      height:70px;
      width:70px;
      left: -20px;
      top: -20px;
      -moz-animation: music .5s infinite;
      -webkit-animation: music .5s infinite;
      animation: music .5s infinite;
      -moz-animation-delay: 2s;
      -webkit-animation-delay: 2s;
      animation-delay: 2s;
    }
  }
}

.shadow {
  position: absolute;
  bottom: -30px;
  left: -25px;
  width: 275px;
  height: 40px;
  background: #b7b7b7;
  border-radius: 50%;
  animation: shadow 2s infinite;
  animation-delay: 2s;
}
            
          
!
999px
Loading ..................

Console