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.

            
              input(type="checkbox").switch#notify
label(for="notify") Notifications

input(type="checkbox").symbol#tnc
label(for="tnc") Terms & Conditions

input(type="checkbox").box#age
label(for="age") Show Age

input(type="checkbox").box.radio#name
label(for="name") Show Name
            
          
!
            
              body
   background: #333
   color: #ddd
   font:
      size: 16px
      family: Arial, sans-serif

label
   margin: 50px
   cursor: pointer
   
.switch
   display: none
.switch + label
   position: relative
   display: inline-block
   padding-right: 60px
   
   &:before,
   &:after
      content: ''
      display: block
      position: absolute
      top: 50%
      transition: background 200ms ease-in-out
   &:after
      right: 20px
      margin-top: -15px
      width: 30px
      height: 30px
      border-radius: 50%
      background: #ddd
      transition: right 200ms ease-in-out
   &:before
      right: 5px
      margin-top: -10px
      width: 40px
      height: 20px
      border-radius: 25px
      background: #b53
   
.switch:checked + label
   &:after
      right: 0
      
   &:before
      background: #9b3
   
   
.symbol
   display: none
.symbol + label
   position: relative
   padding-right: 50px
   
   &:before, 
   &:after
      content: ''
      position: absolute
      display: inline-block
      background: #b53
      border-radius: 10px
      transition: transform 200ms ease-in-out, background 200ms ease-in-out, top 200ms ease-in-out, right 200ms ease-in-out
   &:before 
      width: 15px
      height: 35px
      top: -5px
      right: 10px
      transform: rotate(-135deg)
   
   &:after
      width: 35px
      height: 15px
      top: 5px
      right: 0
      transform: rotate(-135deg)
   
.symbol:checked + label
   
   &:before 
      width: 15px
      height: 25px
      top: 5px
      right: 20px
      transform: rotate(135deg)
      background: #9b3
   
   &:after
      width: 35px
      height: 15px
      top: 6px
      right: -2px
      transform: rotate(135deg)
      background: #9b3
   
.box
   display: none
.box + label
   position: relative
   display: inline-block
   padding-right: 50px
   
   &:after
      display: block
      content: ''
      width: 30px
      height: 30px
      background: #b53
      position: absolute
      top: -5px
      right: 0
      border: 15px solid #ddd
      box-sizing: border-box
      transition: border 200ms ease-in-out, background 400ms ease-in-out
   
.box:checked + label
   &:after
      border: 5px solid #ddd
      background: #9b3
      
.radio + label
   &:after
      border-radius: 50%
            
          
!
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