Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <div class="section one">
   <div id="button">
      Hover
      <div class="ring one"></div>
      <div class="ring two"></div>
      <div class="ring three"></div>
      <div class="ring four"></div>
   </div>
   
</div>
<div class="section two">
   <div id="button">
      Hover
      <div class="ring one"></div>
      <div class="ring two"></div>
      <div class="ring three"></div>
      <div class="ring four"></div>
   </div>
   
</div>
<div class="section three">
   <div id="button">
      Hover
      <div class="ring one"></div>
      <div class="ring two"></div>
      <div class="ring three"></div>
      <div class="ring four"></div>
   </div>
   
</div>
<footer>
   <div>
   Image courtesy<a href="https://unsplash.com">.Unsplash.</a>
      </div>
   <div>
   <a href="https://codepen.io/punitweb">my CodePen</a>
      </div>
   <div>
   <a href="https://www.facebook.com/punitwebdesigner">my Facebook</a>
      </div>
   <div>
   <a href="https://www.instagram.com/punitweb/?hl=en">my Instagram</a>
      </div>
</footer>
              
            
!

CSS

              
                $pale-white: #f6f6f6;
@mixin cover(){
   -webkit-background-size:cover;
   -moz-background-size:cover;
   -o-background-size:cover;
   background-size:cover;
}
@mixin round($radius){
   -webkit-border-radius: $radius;
   -moz-border-radius: $radius;
   -o-border-radius: $radius;
   border-radius: $radius;
}
@mixin big(){
   font-family: 'Montserrat', sans-serif;
}
@mixin anime($time, $cubic){
   -webkit-transition: all $time $cubic;
   -moz-transition: all $time $cubic;
   -o-transition: all $time $cubic;
   transition: all $time $cubic;
}
@mixin center(){
   top: 50%;
   left: 50%;
   -webkit-transform: translate(-50%, -50%);
   -moz-transform: translate(-50%, -50%);
   -o-transform: translate(-50%, -50%);
   transform: translate(-50%, -50%);
}
html{
   width: 100%;
   height: 100%;
   overflow-x:hidden;
   
}
body{
   padding:0;
   margin:0;
}
.section{
  width: 100%;
  height: 400px;
  padding:0;
   position:absolute;
   border-top: 2px solid #fff;
     border-bottom: 2px solid #fff;
}

 .one{
    top:0px;
    left:0px;
      background: url(https://images.unsplash.com/photo-1461887046916-c7426e65460d?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&s=2a03e179401fab10a3b1941193440e12) center center no-repeat;
    @include cover();
    #button{
       width: 122px;
       padding: 6px;
       height: 50px;
       color: $pale-white;
       @include big();
       font-size: 2.5em;
       position:absolute;
       @include center();
       border: #fff 2px solid;
       overflow:hidden;
       @include anime(0.6s, (cubic-bezier(.55,0,.1,1)));
       cursor: pointer;
       box-shadow: 0px 0px 0px #fff;
       &:hover{
          text-shadow: 0px 8px 6px rgba(0,0,0,0.9);
          box-shadow: 8px 8px 0px #fff, -8px -8px 0px #fff;
       }
       &:hover .one{
           opacity:1;
         transform: translate3d(0px ,0px ,0px);
       }
       &:hover .two{
          
          transform: translate3d(0px ,0px ,0px);
       }
       &:hover .three{
          transform: translate3d(0px ,0px ,0px);
       }
       &:hover .four{
          transform: translate3d(0px ,0px ,0px);
       }
       .ring{
          width: 100%;
          height: 100%;
          position: absolute;
          background: transparent;
          top:0;
          left:0;
          transform: translate3d(0px ,90px ,0px);
       }
       .one{
          background-color: #FE6B26;
          @include anime(0.3s, (cubic-bezier(.55,0,.1,1)));
          z-index: -3;
          z-index: -4;
       }
       .two{
          background-color:#FE8EFE;
          @include anime(0.5s, (cubic-bezier(.55,0,.1,1)));
          z-index: -3;
       }
       .three{
          background-color: #841EE4;
          z-index: -2;
          @include anime(0.7s, (cubic-bezier(.55,0,.1,1)));
          z-index: -3;
       }
       .four{
         background-color:#3E12FD;
          z-index: -1;
          @include anime(0.9s, (cubic-bezier(.55,0,.1,1)));
          z-index: -3;
       }
    }
   }
.two{
   top: 400px;
   left:0;
   background: url(https://images.unsplash.com/photo-1470093851219-69951fcbb533?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&s=d40a9b070414fc8088992b91563b17ef) center center no-repeat;
   @include cover();
    #button{
       width: 122px;
       padding: 16px;
       height: 50px;
       color: $pale-white;
       @include big();
       font-size: 2.5em;
       position:absolute;
       @include center();
       background: transparent;
       overflow:hidden;
       @include anime(0.6s, (cubic-bezier(.55,0,.1,1)));
       cursor: pointer;
       box-shadow: 0px 0px 0px #fff;
      @include round(50px);
       border: #594A83 solid 8px;
       z-index: 0;
       &::after{
          position: absolute;
          content:"";
          top: 0px;
          left: 0px;
          width: 0%;
          height: 100%;
        
          background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(transparent));
  background-image: -webkit-linear-gradient(left, #fff, transparent);
  background-image: -moz-linear-gradient(left, #fff, transparent);
  background-image: -o-linear-gradient(left, #fff, transparent);
          z-index: -1;
          @include anime(2s, ease);
       }
       &:hover::after{
    width: 800%;
         
       }
       &:hover{
          color: #505050;
          box-shadow: 0px 20px 8px rgba(0,0,0,.6);
       }
      
   }
   }
.three{
   z-index: -1;
   top: 800px;
   left:0;
   background: url(https://images.unsplash.com/photo-1431440869543-efaf3388c585?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&s=a9ed512366462aff761f7c04ac383675) center center no-repeat;
   @include cover();
    #button{
       width: 122px;
       padding: 16px;
       height: 50px;
       color: $pale-white;
       @include big();
       font-size: 2.5em;
       position:absolute;
       @include center();
       background: transparent;
       @include anime(0.6s, (cubic-bezier(.55,0,.1,1)));
       cursor: pointer;
       box-shadow: 0px 0px 0px #fff;
     
       
       z-index: 0;
       .ring{
          position: absolute;
          width: 20px;
          height: 20px;
          background: #fff;
          @include round(50px);
          top: 40%;
          left: 45%;
          @include anime(1s,(cubic-bezier(.55,0,.1,1)));
          transform:perspective(500px)  translate3d(0px, 0px,0px);
          opacity: 0.0;
       }
       
       &:hover .one{
          transform:perspective(500px)  translate3d(-90px, -50px,150px);
          opacity: 1;
       }
        &:hover .two{
          transform:perspective(800px)  translate3d(-130px, 50px,180px);
          opacity: 0.6;
       }
        &:hover .three{
          transform:perspective(800px)  translate3d(130px, 50px,30px);
          opacity: 0.2;
       }
       &:hover .four{
          transform:perspective(800px)  translate3d(130px, -120px,80px);
          opacity: 0.9;
       }
       &::after{
         position: absolute;
          top: -35px;
          left:0;
         width: 150px;
         height: 150px;
          content: "";
          background: #fff;
          z-index: -1;
          transform:perspective(800px) scale(0.0) rotate(0deg);
          @include anime(2s,(cubic-bezier(.55,0,.1,1)));
       }
       &:before{
           position: absolute;
          top: -40px;
          left:-6px;
         width: 160px;
         height: 160px;
          border: solid 1px #fff;
          content: "";
          background:transparent;
          z-index: -1;
          transform:perspective(800px) scale(0.4) rotate(0deg);
          @include anime(2s, (cubic-bezier(.55,0,.1,1)));
       }
       &:hover::after{
         transform:perspective(800px) scale(1.0) rotate(600deg);
         
       }
       &:hover::before{
           transform:perspective(800px) scale(1.0) rotate(-100deg);
       }
       &:hover{
          color: #505050;
       }
      
   }
   }
footer{
   position: absolute;
   top: 1190px;
   
   left:0;
   color: #fff;
   div{
      display: inline-block;
      margin-left: -4px;
      &:nth-child(1){
         background: #000;
      }
      &:nth-child(2){
         background: #303030;
      }
      &:nth-child(3){
         background: #3B5998;
      }
      &:nth-child(4){
         background: #B3339F;
      }
      padding:40px;
   }
   
   a{
      color: #fff;
   }
}
              
            
!

JS

              
                
              
            
!
999px

Console