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="pl1">
	<div class="pl1__a"></div>
	<div class="pl1__b"></div>
	<div class="pl1__c"></div>
</div>

<div class="pl2">
	<div class="pl2__a"></div>
	<div class="pl2__b"></div>
	<div class="pl2__c"></div>
</div>

<div class="pl3">
	<div class="pl3__a"></div>
	<div class="pl3__b"></div>
	<div class="pl3__c"></div>
	<div class="pl3__d"></div>
</div>

<div class="pl4">
	<div class="pl4__a"></div>
	<div class="pl4__b"></div>
	<div class="pl4__c"></div>
	<div class="pl4__d"></div>
</div>

              
            
!

CSS

              
                *
	border: 0
	box-sizing: border-box
	margin: 0
	padding: 0
\:root
	--bg: #{hsl(223,10%,90%)}
	--fg: #{hsl(223,10%,10%)}
	--c1: #{hsl(3,90%,55%)}
	--c2: #{hsl(33,90%,55%)}
	--c3: #{hsl(223,90%,55%)}
	--c4: #{hsl(273,90%,55%)}
	font-size: calc(16px + (24 - 16) * (100vw - 320px) / (1280 - 320))
body
	background: var(--bg)
	color: var(--fg)
	display: flex
	flex-wrap: wrap
	font: 1em/1.5 sans-serif
	justify-content: center
	align-items: center
	align-content: center
	height: 100vh
.pl1, .pl2
	justify-content: space-around
	&__a, &__b, &__c
		border-radius: 50%
		width: 1em
		height: 1em
		transform-origin: 50% 100%
.pl1
	&__a, &__b, &__c
		animation: bounce1 1s linear infinite
.pl2
	&__a, &__b, &__c
		animation: bounce2 2s linear infinite
.pl3, .pl4
	justify-content: space-between
	&__a, &__b, &__c, &__d
		width: 0.75em
		height: 0.75em
.pl3
	&__a, &__b, &__c, &__d
		animation: bounce3 2s ease-in-out infinite
		transform-origin: 50% 0
.pl4
	align-items: flex-end
	&__a, &__b, &__c, &__d
		animation: bounce4 2s linear infinite
		transform-origin: 50% 100%
.pl1, .pl2, .pl3, .pl4
	display: flex
	margin: 1.5em
	width: 6em
	height: 6em
	&__a
		background: var(--c1)
	&__b
		background: var(--c2)
		animation-delay: 0.1s
	&__c
		background: var(--c3)
		animation-delay: 0.2s
.pl3, .pl4
	&__d
		background: var(--c4)
		animation-delay: 0.3s

/* Animations */
@keyframes bounce1
	from, to
		transform: translateY(0) scale(1,1)
		animation-timing-function: ease-in
	45%
		transform: translateY(5em) scale(1,1)
		animation-timing-function: linear
	50%
		transform: translateY(5em) scale(1.5,0.5)
		animation-timing-function: linear
	55%
		transform: translateY(5em) scale(1,1)
		animation-timing-function: ease-out
@keyframes bounce2
	from, to
		transform: translateY(0) scale(1,1)
		animation-timing-function: ease-in
	9%, 29%, 49%, 69%
		transform: translateY(5em) scale(1,1)
		animation-timing-function: linear
	10%
		transform: translateY(5em) scale(1.5,0.5)
		animation-timing-function: linear
	11%, 31%, 51%, 71%, 91%
		transform: translateY(5em) scale(1,1)
		animation-timing-function: ease-out
	20%
		transform: translateY(2.5em) scale(1,1)
		animation-timing-function: ease-in
	30%
		transform: translateY(5em) scale(1.25,0.75)
		animation-timing-function: linear
	40%
		transform: translateY(3.75em) scale(1,1)
		animation-timing-function: ease-in
	50%
		transform: translateY(5em) scale(1.125,0.875)
		animation-timing-function: linear
	60%
		transform: translateY(4.375em) scale(1,1)
		animation-timing-function: ease-in
	70%
		transform: translateY(5em) scale(1.0625,0.9375)
		animation-timing-function: linear
	85%
		transform: translateY(5em) scale(1,1)
		animation-timing-function: ease-in
	90%
		transform: translateY(5em) scale(1.875,0.125)
		animation-timing-function: ease-in-out
@keyframes bounce3
	from, 5%, 95%, to
		transform: translateY(0) scaleY(1)
	16.7%
		transform: translateY(0) scaleY(8)
	28.3%, 38.3%
		transform: translateY(5.25em) scaleY(1)
	50%
		transform: translateY(2.625em) scaleY(4.5)
	61.7%, 71.7%
		transform: translateY(2.625em) scaleY(1)
	83.3%
		transform: translateY(0) scaleY(4.5)
@keyframes bounce4
	from, 20%, 40%, 60%, 80%, to
		transform: scaleY(1)
		animation-timing-function: ease-out
	10%
		transform: scaleY(8)
		animation-timing-function: ease-in
	30%
		transform: scaleY(4)
		animation-timing-function: ease-in
	50%
		transform: scaleY(2)
		animation-timing-function: ease-in
	70%
		transform: scaleY(1.5)
		animation-timing-function: ease-in

/* Dark theme */
@media (prefers-color-scheme: dark)
	\:root
		--bg: #{hsl(223,10%,10%)}
		--fg: #{hsl(223,10%,90%)}
              
            
!

JS

              
                
              
            
!
999px

Console