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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                .content
  .block
    .border
      span.item.item1
        i
      span.item.item2
        i
      span.item.item3
        i
      span.item.item4
        i
              
            
!

CSS

              
                *
  margin 0
  padding 0
  box-sizing border-box

@keyframes fullwidth
  0%
    width 0
  100%
    width 100%
@keyframes fullheight
  0%
    height 0
  100%
    height 100%
.content
  display flex
  align-items center
  justify-content center
  width 100%
  height 100vh
  min-height 650px
  .block
    position relative
    width 400px
    height 250px
    background-color silver
    .item
      position absolute
      background-color black
      animation-fill-mode both
      i
        display block
        background-color blue
    .item1
      height 5px
      top 0
      left 0
      animation fullwidth 1s both
      i
        width 0
        height 5px
        transition-delay 3s 
        transition-duration 1s
    .item2
      width 5px
      height 0
      top 0
      right 0
      animation fullheight 1s 1s both
      i
        width 5px
        height 0
        transition-delay 2s 
        transition-duration 1s
    .item3
      width 100%
      height 5px
      bottom 0
      right 0
      animation fullwidth 1s 2s both
      i
        position absolute 
        right 0
        width 0
        height 5px
        transition-delay 1s
        transition-duration 1s 
    .item4
      width 5px
      height 0
      bottom 0
      left 0
      animation fullheight 1s 3s both
      i
        position absolute
        bottom 0
        width 5px
        height 0
        transition-delay 0s
        transition-duration 1s
   .block
     &:hover
       .item1
         i
           width 100%
           transition-delay 0s 
           transition-duration 1s
       .item2 
         i 
           height 100%
           transition-delay 1s 
           transition-duration 1s
       .item3 
         i
           width 100%
           transition-delay 2s 
           transition-duration 1s
       .item4 
         i
           height 100%
           transition-delay 3s
           transition-duration 1s
         
              
            
!

JS

              
                
              
            
!
999px

Console