css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div id="painting">
  <div class="nail"></div>
  <div class="plaque">Scene From Moby Dick</div>
  <div class="background"></div>
  <div class="boat">
    <div class="sail-left"></div>
    <div class="sail-right"></div>
  </div>
  <div class="clouds"></div>
</div>
            
          
!
            
              @import "compass/css3";

* {
  @include box-sizing(border-box);
  
  padding: 0;
  margin: 0;
  
  &:before,
  &:after {
    @include box-sizing(content-box);
  }
}

body {
  background: #fac5cb;
  text-align: center;
  padding: 50px 0;
}

#painting {
  @include transform(rotate(-2deg));
  @include transform-origin(50% -40px 0 0);
  
  position: relative;
  display: inline-block;
  background: #211309;
  
  width: 300px;
  height: 234px;
  
  border: solid 3px #211309;
  
  &:before,
  &:after {
    content: " ";
    position: absolute;
    
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    border-style: solid;
    border-color: transparent;
    border-width: 25px;
  }
  
  &:before {
    // Top & bottom border, adds the nice separator line ;)
    top: 2px;
    bottom: 2px;
    
    border-color: transparent #bb6c39;
  }
  
  &:after {
    // Top & bottom border, adds the nice separator line ;)
    left: 2px;
    right: 2px;
    
    border-color: #bb6c39 transparent;
  }
  
  .nail {
    @include border-radius(50%);
    
    position: absolute;
    background: #211309;
    
    top: -40px;
    left: 0;
    right: 0;
    
    height: 6px;
    width: 6px;
    
    margin: auto;
    
    &:before,
    &:after {
      @include transform-origin(0, 0, 0);
      content: " ";
      position: absolute;
      background: #211309;
      
      height: 50px;
      width: 2px;
      
      left: 2px;
      top: 2px;
    }
    
    &:before {
      @include transform(rotate(-35deg));
    }
    
    &:after {
      @include transform(rotate(35deg));
    }
  }
  
  .plaque {
    @include border-radius(4px);
    position: absolute;
    background: #ffbf22;
    font-size: 11px;
   
    left: 0;
    right: 0;
    bottom: 5px;
    
    width: 125px;
   
    margin: auto;
    border: solid 2px #211309; 
    z-index: 10;
    
    &:before,
    &:after {
      @include border-radius(50%);
      
      content: " ";
      position: absolute;
      background: #211309;
      
      top: 0;
      bottom: 0;
      
      width: 2px;
      height: 2px;
      
      margin: auto;
    }
    
    &:before {
      left: 2px;
    }
    
    &:after {
      right: 2px;
    }
  }
  
  .background {
    position: absolute;
    
    top: 28px;
    left: 28px;
    right: 28px;
    bottom: 28px;
    
    background: #211309;
    border-top: solid 144px #a3cacd;
    border-bottom: solid 25px #8ca1bd;
  }
  
  .boat {
    @include border-bottom-left-radius(12px 22px);
    @include border-bottom-right-radius(12px 22px);
    position: absolute;
    background: #c95539;
    
    width: 136px;
    height: 21px;
    
    top: 153px;
    left: 0;
    right: 0;
    
    border: solid 2px #211309;
    margin: auto;
    
    &:before {
      @include border-radius(0 0 7px 7px);
      
      content: " ";
      position: absolute;
      background: #c95539;
      
      width: 152px;
      height: 6px;
      
      top: -10px;
      left: -12px;
      
      border: solid 2px #211309;
    }
    
    &:after {
      @include border-radius(4px 4px 0 0);
      content: " ";
      position: absolute;
      background: #c95539;
      
      width: 4px;
      height: 100px;
      
      top: -112px;
      left: 50%;
      margin-left: -4px;
      
      border: solid 2px #211309;
    }
    
    .sail-left {
      @include transform(rotate(22deg));
      top: -100px;
      left: 14px;
      
      &,
      &:before {
        @include border-radius(4px);
        content: " ";
        position: absolute;

        border-style: solid;
        border-color: transparent transparent #211309 transparent;
        border-width: 0 22px 77px 31px;
      }
      
      &:before {
        @include border-radius(3px);
        content: " ";
        
        top: 4px;
        left: -28px;
        
        border-bottom-color: #ffffff;
        border-width: 0 19px 71px 28px;
      }
    }
    
    .sail-right {
      @include transform(rotate(-23deg));
      top: -106px;
      left: 64px;
      
      &,
      &:before {
        @include border-radius(4px);
        content: " ";
        position: absolute;

        border-style: solid;
        border-color: transparent transparent #211309 transparent;
        border-width: 0 26px 85px 24px;
      }
      
      &:before {
        @include border-radius(3px);
        content: " ";
        
        top: 5px;
        left: -22px;
        
        border-bottom-color: #ffffff;
        border-width: 0 24px 78px 22px;
      }
    }
  }
  
  .clouds {
    @include border-radius(50%);
    @include box-shadow((
      0 0 0 0 #ffffff,
      16px 3px 0 -4px #ffffff,
      29px 5px 0 -9px #ffffff,
      
      0 0 0 2px #211309,
      16px 3px 0 -2px #211309,
      29px 5px 0 -7px #211309,
      
      /* Cloud 2 */
      185px 10px 0 -4px #ffffff,
      170px 10px 0 2px #ffffff,
      150px 10px 0 -2px #ffffff,
      
      185px 10px 0 -2px #211309,
      170px 10px 0 4px #211309,
      150px 10px 0 0 #211309
    ));
    
    position: absolute;
    background: #ffffff;
    
    width: 30px;
    height: 30px;
    
    top: 50px;
    left: 45px;
  }
}
            
          
!
            
              /* 
The Simpsons painting: A scene from Moby Dick
Made by Kevin Jannis (@kevinjannis)
View more at www.janniskev.in 
*/
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console