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

              
                <input class="go" type="checkbox">
<img class="tortoise" src="https://treehouse-code-samples.s3.amazonaws.com/CSS-DD/codepen/blog/animation-tut/tortoise.png" alt="the irate tortoise">
<img class="hare" src="https://treehouse-code-samples.s3.amazonaws.com/CSS-DD/codepen/blog/animation-tut/hare.png" alt="the boastful hare">
<div class="road"></div>
              
            
!

CSS

              
                /* Race Animations - Example for Webkit Only */
	
.go:checked + .tortoise { 
	-webkit-animation: go-tortoise 6s 1  1.3s ease-in-out forwards;
}

/* Keyframes */

@-webkit-keyframes go-tortoise { 
    20%, 
    40%  { left: 20%; }
    60%  { left: 45%; }
    80%  { left: 60%; }
    90%  { left: 70%; }
    100% { left: 80%; }
}
@-webkit-keyframes go-hare {
	20%  { left: 20%; }
	40%  { left: 40%; }
	60%  { left: 65%; }
	80%  { left: 72%; }
	100% { left: 80%; }
}
@-webkit-keyframes hare-hop {
	50%  { -webkit-transform: translate3d(0,415px,0); }
}
@-webkit-keyframes move-road {
	100% { background-position: -1599px 50%; }
}
@-webkit-keyframes rotate-road {
	100% { -webkit-transform: rotate3d(1,0,0,35deg); }
}
@-webkit-keyframes winner {
	100% { opacity: 1; }
}
              
            
!

JS

              
                
              
            
!
999px

Console