Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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 class="box"></div>
              
            
!

CSS

              
                * {
  &,
  &::before,
  &::after {
    box-sizing: border-box;
  }
}

html {
  height: 100%;
}

body {
  font-size:   1em;
  line-height: 1.5;
  background-color: #3D3D3E;
  color: white;
  padding: 0.75em;
  font-family: 'PT Serif',
               Georgia, 
               Times,
               'Times New Roman',
               serif;
  display: flex;
  height: 100%;
}

.box {
  box-shadow: 0 0 3px transparentize(black, 0.75);
  background-color: white;
  color: black;
  position: relative;
  margin: 0.75em;
  float: left;
  border: 2px dashed #DB5640;
  width:  300px;
  height: 300px;
  margin: auto;
  position: relative;
  
  border-radius: 100% 0 200px 0;
  
  animation: border 3s alternate infinite;
    
  &::before {
    content: '';
    position: absolute;
    bottom: 200px;
    right: 0;
    margin-right: -12px;
    margin-bottom: -12px;
    width: 20px;
    height: 20px;
    border: 2px solid black;
    border-radius: 50%;
    
    animation: ellipse-bottom 3s alternate infinite;
  }
  
  &::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    margin-right: -12px;
    margin-top: -12px;
    width: 20px;
    height: 20px;
    border: 2px solid black;
    border-radius: 50%;
    
    animation: ellipse-top 3s alternate infinite;
  }
}

@keyframes border {
  50% {
    border-top-right-radius: 0%;
  }
  100% {
    border-top-right-radius: 50%;
  }
}

@keyframes ellipse-bottom {
  50% {
    bottom: 200px;
  }
  100% {
    bottom: (200px / 1.5);
  }
}

@keyframes ellipse-top {
  50% {
    right: 0;
  }
  100% {
    right: (50% / 1.5);
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console