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 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

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

              
                div.btn BTN

div.img-section
  div.header Test
  div.img-box
    div.img-ttl dummy image
    div.img-dummy
    div.img-frame
      svg.frame(version='1.1', xmlns='http://www.w3.org/2000/svg', xmlns:xlink='http://www.w3.org/1999/xlink', preserveAspectRatio='none', viewBox='0 0 640 640')
        defs
          path.bottom-wave#cBBFTBwXK(d='M340 264.74C233.33 158.07 120 69.82 0 0L0 640L640 640C546.67 496.49 446.67 371.4 340 264.74Z')
          path.top-wave#abb2YnZoD(d='M300 340C406.67 446.67 520 546.67 640 640L640 0L0 0C93.33 120 193.33 233.33 300 340Z')
        g
          g
            g
              use(xlink:href='#cBBFTBwXK', opacity='1', fill='#dfe6e9', fill-opacity='1')
            g
              use(xlink:href='#abb2YnZoD', opacity='1', fill='#dfe6e9', fill-opacity='1')
              
            
!

CSS

              
                .btn{
  display:flex;
  justify-content: center;
  align-items:center;
  position:absolute;
  width:50px;
  height:50px;
  border-radius:5px;
  top: 50px;
  left: 650px;
  background:#2d3436;
  color:#dfe6e9;
  cursor: pointer;
}

.img-section{
  box-sizing: border-box;
  background:#dfe6e9;
  width:480px;
  
  .header{
    background:#2d3436;
    color:#dfe6e9;
    height:70px;
    text-align:center;
    line-height:70px;
    letter-spacing:4px;
    font-size:24px;
    border-bottom: 5px solid #636e72;
  }
  
  .img-box{
    box-sizing:border-box;
    position: relative;
    width:100%;
    height: 260px;
    padding:30px 20px;
    
    .img-ttl{
      z-index:10;
      position: relative;
      height:200px;
      line-height:200px;
      font-size:26px;
    }
    
    .img-dummy{
      position: absolute;
      background-image: linear-gradient(to right, #b8cbb8 0%, #b8cbb8 0%, #b465da 0%, #cf6cc9 33%, #ee609c 66%, #ee609c 100%);
      top:30px;
      right: 20px;
      width:300px;
      height:200px;
    }
    
    .img-frame{
      position:absolute;
      top:30px;
      right: 20px;
      width:300px;
      height:200px;
      
      .frame{
        height: 200px;
        width: 300px;
      }
    }
  }
}
              
            
!

JS

              
                const $topw = Snap(".top-wave");
const $btmw = Snap(".bottom-wave");

let states = "close";

$('.btn').on('click', function(){
  if(states === "close"){
    $btmw.animate({d:"M40 600C20 580 6.67 553.33 0 520L0 640L120 640C86.67 633.33 60 620 40 600Z"},350, mina.easein);
    $topw.animate({d:"M600 40C620 60 633.33 86.67 640 120L640 0L520 0C553.33 6.67 580 20 600 40Z"},350, mina.easein);
    states = "open";
  }else{
    $btmw.animate({d:"M340 264.74C233.33 158.07 120 69.82 0 0L0 640L640 640C546.67 496.49 446.67 371.4 340 264.74Z"},350, mina.easein);
    $topw.animate({d:"M300 340C406.67 446.67 520 546.67 640 640L640 0L0 0C93.33 120 193.33 233.33 300 340Z"},350, mina.easein);
    states = "close";
  }
});
              
            
!
999px

Console