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

              
                <figure class="devices">
  <div class="device laptop">
    <div id="laptop" class="device-screen">
      <img src="https://properdesign.co.uk/wp-content/uploads/2015/01/screencapture-botanicgarden-wales-2018-05-09-14_37_36.jpg"> </div>
  </div>
  <div class="device mobile">
    <div id="mobile" class="device-screen">
      <img src="https://properdesign.co.uk/wp-content/uploads/2015/01/screencapture-botanicgarden-wales-2018-05-09-14_38_13.jpg">      </div>
  </div>
  <div class="device tablet">
    <div id="tablet" class="device-screen">
      <img src="https://properdesign.co.uk/wp-content/uploads/2015/01/screencapture-botanicgarden-wales-2018-05-09-14_38_48.jpg">      </div>
  </div>
</figure>
              
            
!

CSS

              
                html,
body{
  margin:0;
  padding:0;
}
*{
  box-sizing:border-box;
}
.devices{
  background-color:#eaeaea;
  margin: 0;
  display:grid;
  grid-template-columns:repeat(20, 5vw);
  grid-auto-rows:5vw;
  padding-bottom:5vw;
}

.device{
  background-color:black;
  position: relative;
  border:solid 0.5vw black;
  box-shadow:0 0.25vw 0.5vw rgba(0,0,0,0.2);
}


.device-screen{
  width:100%;
  height:100%;
  background-color:black;
  overflow:hidden;
  overflow-y:scroll;
  img{
    display:block;
    width:100%;
    height:auto;
    margin:0;
  }
}


.mobile{
  border-top:solid 1vw black;
  border-bottom:solid 2vw black;
  grid-column:2 / span 3;
  grid-row: 3 / span 6;
  border-radius:1.5vw;
  .device-screen{
    border-radius:1vw;
  }
}

.tablet{
  border-left:solid 2vw black;
  grid-column:13 / span 7;
  grid-row: 4 / span 5;
  border-radius:1vw;
  .device-screen{
    border-radius:0.5vw;
  }

}
.laptop{
  grid-column:3/span 13;
  grid-row: 2 / span 8;
  border:solid 1vw #999999;
  &:after{
    content:"";
    position:absolute;
    bottom:-3vw;
    left:-7.5vw;
    right:-7.5vw;
    height:3vw;
    background-color:#999999;
    border-radius: 0 0 1vw 1vw;
  }
}
              
            
!

JS

              
                

              
            
!
999px

Console