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

CSS

              
                html, body {
	margin: 0;
	background: pink;
}
.heartbeat{
	position: absolute;
	top: 50%;
	left: 50%;
  width:90px;
  height:60px;
	animation: beat 1.5s ease-in-out both infinite;
	transform: translate(-50%, -50%);
	transform-origin: 25% 25%;
}
.heartbeat:after{
  position:absolute;
  top:-10px;
  left:-10px;
  width:10px;
  height:10px;
  content:'';
  box-shadow:10px 10px transparent, 20px 10px transparent, 30px 10px red, 40px 10px red, 50px 10px transparent, 60px 10px red, 70px 10px red, 80px 10px transparent, 90px 10px transparent, 10px 20px transparent, 20px 20px red, 30px 20px red, 40px 20px red, 50px 20px red, 60px 20px red, 70px 20px red, 80px 20px red, 90px 20px transparent, 10px 30px transparent, 20px 30px red, 30px 30px red, 40px 30px red, 50px 30px red, 60px 30px red, 70px 30px red, 80px 30px red, 90px 30px transparent, 10px 40px transparent, 20px 40px transparent, 30px 40px red, 40px 40px red, 50px 40px red, 60px 40px red, 70px 40px red, 80px 40px transparent, 90px 40px transparent, 10px 50px transparent, 20px 50px transparent, 30px 50px transparent, 40px 50px red, 50px 50px red, 60px 50px red, 70px 50px transparent, 80px 50px transparent, 90px 50px transparent, 10px 60px transparent, 20px 60px transparent, 30px 60px transparent, 40px 60px transparent, 50px 60px red, 60px 60px transparent, 70px 60px transparent, 80px 60px transparent, 90px 60px transparent;
}
@keyframes beat {
	0% {
		transform: scale(1) translate(-50%, -50%);
	}
	50% {
		transform: scale(1.5) translate(-50%, -50%);
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console