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

              
                
  <div class="shape"></div>

  <img src="https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2014/08/1407310358spinner-cropped.gif" />

              
            
!

CSS

              
                $blue: #158BC5
$green: #1EB287
$red: #D25E51
$duration: 1.5s
$border: 20px
$angle: 30deg
.shape
  height: 0
  width: 0
  margin: 36px
  float: left
  border: $border solid
  animation: morphing $duration ease infinite
.shape:after
  content: ''
  display: block
  border: inherit
  margin-left: -($border - 1)
  margin-top: -($border - 1)
  animation: pseudomorphing $duration ease infinite
img
  float: left
    
@keyframes morphing
  0%
    border-color: transparent $red $red transparent
    transform: rotateZ(6*$angle)
    border-radius: 50%
  33.33%
    border-color: transparent $green $green transparent
    transform: rotateZ(9*$angle)
    border-radius: 0
  66.67%
    border-color: transparent $blue $blue transparent
    transform: skewX($angle) rotateX($angle) rotateZ(0) translateX(-($border/2))
    border-radius: 0
  100%
    border-color: transparent $red $red transparent
    transform: rotateZ(3*$angle)
    border-radius: 50%
    
@keyframes pseudomorphing
  0%
    border-color: $red transparent transparent $red
    transform: rotateY(0)
    border-radius: 50%
  33.33%
    border-color: $green transparent transparent $green
    transform: rotateY(0)
    border-radius: 0
  66.67%
    border-color: $blue transparent transparent $blue
    transform: skewX(-$angle) rotateX(-$angle) rotateZ($angle) rotateY(3*$angle) scale(0.8)
    border-radius: 0
  100%
    border-color: $red transparent transparent $red
    transform: rotateY(0)
    border-radius: 50%

              
            
!

JS

              
                
              
            
!
999px

Console