Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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.

+ add another resource

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <body><div class="background"><div class="content">
  <div class="block x1">Hover Over Me!</div>
  <div class="block x2">Or Over Me!</div>
  <div class="block x3">Try Hovering Here</div>
  <div class="block x4">Last But Not Least</div>
  <div class="block x5">Now Here!</div>
</div>
</div>
</body>
              
            
!

CSS

              
                .background:before{
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: -1;
  display: block;
  background-size: 100% 100%;
  background-image: url('https://s3.amazonaws.com/StartupStockPhotos/20140808_StartupStockPhotos/53.jpg');
  width: 150%;
  height: 150%;
  top:-20px;
  left:-20px;
  -webkit-filter: blur(8px);
  -moz-filter: blur(8px);
  -o-filter: blur(8px);
  -ms-filter: blur(8px);
  filter: blur(8px);
  background-repeat:no-repeat;
}

.content{
  height: 400px;
  width: 700px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  color: white;
-webkit-box-shadow: 10px 10px 60px 10px rgba(0,0,0,0.1);
-moz-box-shadow: 10px 10px 60px 10px rgba(0,0,0,0.1);
box-shadow: 10px 10px 60px 10px rgba(0,0,0,0.1);
}

body{
  font-family: 'Roboto Condensed', sans-serif;
  text-align:center;
  vertical-align:middle;  
}

.x1{
  width:200px;
  height:150px;
  background-color:#9CB1FF;
  left: 0;
  top: 0;
  position: relative;
  line-height:150px;
}

.x2{
  position:absolute;
  height:250px;
  width:300px;
  left:400px;
  top:0px;
  background-color:#FFFFFF;
  line-height:250px;
  color:black;
}

.x3{
  position:absolute;
  height:250px;
  width:200px;
  left:0px;
  top:150px;
  background-color:#6694FC;
  line-height:250px;
}

.x4{
  position:absolute;
  height:150px;
  width:500px;
  left:200px;
  top:250px;
  background-color:#706AF3;
  line-height:150px;
}

.x5{
  position:absolute;
  height:250px;
  width:200px;
  left:200px;
  top:0px;
  background-color:#8593E6;
  line-height:250px;
}

.block{
  -webkit-animation:scaledown 1s linear;
  -moz-animation:scaledown 1s linear;
  animation:scaledown 1s linear;
  transform-origin:50% 50%;
  animation-fill-mode: forwards;
}

.block:hover{
   z-index:100;
  -webkit-animation:scale 1s linear;
  -moz-animation:scale 1s linear;
  animation:scale 1s linear;
  transform-origin:50% 50%;
  animation-fill-mode: forwards;
}



@keyframes scale{
  0%{
    transform:scale(1.0);
  }
  100%{
    transform:scale(1.1);
    -webkit-box-shadow: 10px 10px 60px 10px rgba(0,0,0,0.1);
-moz-box-shadow: 10px 10px 60px 10px rgba(0,0,0,0.1);
box-shadow: 10px 10px 60px 10px rgba(0,0,0,0.1);
  }
}

@keyframes scaledown{
  0%{
    transform:scale(1.1);
  }
   100%{
    transform:scale(1.0);
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console