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.

            
              <h1>Please don't click me</h1>
<div class="box">
  <!--Body-->
  <div class="body">
    
    <!-- Body copy -->
    <div class="body-copy"></div>
    <!-- End body copy-->
    
    
    <!--Eyes-->
    <div class="left-eye"></div>
    <div class="right-eye"></div>
    <!--End eyes-->
  
    <!--Top part-->
    <div class="top-brown-part"></div>
    <div class="top-white-part"></div>
    <!--End top part-->
  
    <!-- Feet-->
    <div class="left-foot"></div>
    <div class="right-foot"></div>
      <!--End feet-->
  
  <!-- Crank-->
    <div class="crank-straight"></div>
    <div class="crank-top"><div class="crank-hole"></div></div>
    <div class="crank-bottom"><div class="crank-hole"></div></div>
    
    <!--Burst - should be hidden until clicked-->
    <div class="outer-burst hidden"><div class="inner-burst"></div></div>
    <!-- End burst-->
  
</div> <!--End body-->
</div> <!--End box-->
            
          
!
            
              /* background from: 
https://wall.alphacoders.com/big.php?i=40558
*/

body {
background: url(https://c1.staticflickr.com/1/302/32610661405_7c624975aa_b.jpg) no-repeat fixed center;
background-size: cover;
        
}
h1 {
  text-align: center;
  font-family: 'Coda', cursive;
  color: #000;
  margin-top: 10%;
}

.box {
  position: relative;
  margin: auto;
  display: block;
  margin-top: 8%;
  width: 600px;
  height: 420px;
  background: none;
}

.body {
  position: absolute;
  background: #000;
  top: 5%;
  left: 30%;
  width: 35%;
  height: 50%;
  border-radius: 50%;
  
}

.body-copy{
  width: 100%;
  height: 100%;
  position: absolute;
  background: radial-gradient(#505369, #3D3E4D, #111640, black);
  border-radius: 50%;
  z-index: 4;
  border: 4px solid #000;
}

.left-eye {
  background: #FFF;
  width: 15%;
  height: 25%;
  position: absolute;
  z-index: 5;
  border-radius: 50%;
  left: 15%;
  top: 30%;
  border: 4px solid #000;
}

.right-eye {
  background: #FFF;
  width: 15%;
  height: 25%;
  position: absolute;
  z-index: 5;
  border-radius: 50%;
  right: 45%;
  top: 30%;
  border: 4px solid #000;
}

.top-white-part {
  background: #FFF;
  width: 30%;
  height: 6%;
  position: absolute;
  border: 6px solid #000;
  left: 40%;
  z-index: 2;
  top: -8%;
  transform: rotate(10deg);
}

.top-brown-part {
  z-index: 1;
  background: #855A0F;
  height: 20%;
  width: 5%;
  border: 5px solid #000;
  position: absolute;
  top: -30%;
  transform: rotate(20deg);
  left: 56%;
  border-radius: 50% 50% 0% 00%;
}

.left-foot {
  background: #855A0F;
  position: absolute;
  height: 42%;
  width: 60%;
  border: 5px solid #000;
  top: 70%;
  left: -10%;
  border-radius: 50% 50% 40% 50%;
  z-index: 2;
}

.right-foot {
  background: #855A0F;
  position: absolute;
  height: 42%;
  width: 60%;
  border: 5px solid #000;
  top: 78%;
  right: 5%;
  border-radius: 50% 50% 40% 50%;
  z-index: 6;
}

.crank-straight {
  background: #B3B2B0;
  width: 40%;
  height: 3%;
  border: 4px solid #000;
  right: -40%;
  top: 45%;
  position: absolute;
}

.crank-top {
  background: #B3B2B0;
  width: 30%;
  height: 30%;
  border: 4px solid #000;
  top: 13%;
  right: -38%;
  position: absolute;
  border-radius: 50% 50% 0% 0%;
}

.crank-bottom {
  background: #B3B2B0;
  width: 30%;
  height: 30%;
  border: 4px solid #000;
  top: 50%;
  right: -38%;
  position: absolute;
  border-radius: 0% 0% 50% 50%;
}

.crank-hole {
  background: #D2D2D2;
  position: absolute;
  width: 50%;
  height: 55%;
  border-radius: 50%;
  top: 15%;
  left: 20%;
  border: 3px solid #000;
}

.color-change {
  background: radial-gradient(#FF0000, #A90808, #550707, black);
}
.hidden {
  display: none;
}
.outer-burst {
    background: red;
   width: 250px;
    height: 250px;
    position: relative;
    text-align: center;
    z-index: 10;
}

.outer-burst:before, .outer-burst:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background: red;
    z-index: 10;
}

.outer-burst:before {
   -webkit-transform: rotate(30deg);
   -moz-transform: rotate(30deg);
   -ms-transform: rotate(30deg);
   -o-transform: rotate(30deg);
}

.outer-burst:after {
  -webkit-transform: rotate(60deg);
  -moz-transform: rotate(60deg);
  -ms-transform: rotate(60deg);
  -o-transform: rotate(60deg);
}

.inner-burst {
  background: orange;
  width: 170px;
  height: 170px;
  position: relative;
  text-align: center;
  -webkit-transform: rotate(20deg);
  -moz-transform: rotate(20deg);
  -ms-transform: rotate(20deg);
  -o-transform: rotate(20eg);
  z-index: 11;
  top: 15%;
  left: 20%;
}

.inner-burst:before {
  content: "";
  position: absolute;
  top: 0%;
  left: 0%;
  height: 170px;
  width: 170px;
  background: orange;
  -webkit-transform: rotate(135deg);
  -moz-transform: rotate(135deg);
  -ms-transform: rotate(135deg);
  -o-transform: rotate(135deg);
  z-index: 12;
}

            
          
!
            
              $(document).ready(function() {
  
  
  
  $(".body").on('click', function() {
    $("h1").text("nooooo");
    
    function blowSoon() {
    $( ".body-copy" ).animate({
      background: "red",
      width: "110%",
      height: "110%",
      left: "-10%",
      top: "-5%",
    }, 900 );
    
    $( ".body-copy" ).animate({
      background: "#FF0000",
      width: "100%",
      height: "100%",
      left: "0%",
      top: "0%",
    }, 900 );
      
      $(".body-copy").addClass("color-change");
    }
    
    function blowUp() {
      $(".outer-burst").removeClass('hidden');
    }
    
    function hide() {
      $(".outer-burst").hide();
      $(".body").hide();
    }
    
    blowSoon();
    blowSoon();
    blowSoon();
    setTimeout(blowUp, 6000);
    setTimeout(hide, 7000);
    
  });
  
});
            
          
!
999px
Loading ..................

Console