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

              
                p A COLLECTION OF
h1 SCROLL DOWN INDICATORS
.items
	- for(var i=0; i<6; i++)
		.item
			.mouse(class="m-"+i)
		
              
            
!

CSS

              
                $c: #999
$d: transparentize($c, .45)
$t: transparentize($c, .75)

.items
	width: 510px
	margin: 0 auto
	display: grid
	grid-template-columns: repeat(3, 1fr)
	grid-gap: 30px

.item
	width: 150px
	height: 150px
	border: 1px solid $d
	position: relative
	
.mouse
	width: 40px
	height: 60px
	border-radius: 20px
	border: 3px solid $c
	position: absolute
	top: calc(50% - 30px)
	left: calc(50% - 20px)
	&:before, &:after
		content: ''
		display: block
		position: absolute

/* First */
.m-0
	&:before
		height: 30px
		width: 4px
		top: 10px
		left: calc(50% - 2px)
		background: $d
		border-radius: 2px
	&:after
		width: 10px
		height: 10px
		border-radius: 50%
		top: 15px
		left: calc(50% - 5px)
		background: $c
		animation: m-0-ball 1.2s ease-in-out infinite
	
@keyframes m-0-ball
	40%, 60%
		transform: translateY(10px)
/* Second */
.m-1
	&:before
		width: 10px
		height: 10px
		border-radius: 50%
		top: 10px
		left: calc(50% - 5px)
		background: $c
		animation: m-1-ball 1.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite
	
@keyframes m-1-ball
	0%, 65%, 100%
		opacity: 0
	10%, 40%
		opacity: 1
	0%
		transform: translateY(5px) scale(.7)
	5%
		transform: scale(.7)
	15%, 100%
		transform: scale(1)
	45%, 65%
		transform: translateY(24px) scale(.7)

/* Third */
.m-2
	&:before
		width: 4px
		height: 34px
		border-radius: 2px
		top: 10px
		left: calc(50% - 2px)
		background: $c
		animation: m-2-ball 1.2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite
	
@keyframes m-2-ball
	0%, 50%, 60%
		transform: scaleY(0.118)
	30%
		transform: scaleY(1)
	0%, 29.99%
		transform-origin: top
	30%, 100%
		transform-origin: bottom
	90%, 100%
		transform: scaleY(0.118) translateY(-255px)

/* Fourth */
.m-3
	&:before
		width: 6px
		height: 6px
		border-radius: 50%
		top: 6px
		left: calc(50% - 3px)
		box-shadow: 0 6px 0 0 $c, 0 18px 0 0 $c, 0 30px 0 0 $c
		animation: m-3-ball 1.2s ease-in-out infinite
	
@keyframes m-3-ball
	0%, 100%
		box-shadow: 0 6px 0 0 $t, 0 18px 0 0 $t, 0 30px 0 0 $t
	25%
		box-shadow: 0 6px 0 0 $c, 0 18px 0 0 $t, 0 30px 0 0 $t
	50%
		box-shadow: 0 6px 0 0 $t, 0 18px 0 0 $c, 0 30px 0 0 $t
	75%
		box-shadow: 0 6px 0 0 $t, 0 18px 0 0 $t, 0 30px 0 0 $c

/* Fifth */
.m-4
	&:before, &:after
		width: 6px
		height: 6px
		border-radius: 50%
		top: 10px
		left: calc(50% - 3px)
		background: $c
		opacity: 0
		animation: m-4-ball 1.2s ease-in-out infinite
	&:after
		animation-delay: .6s
	
@keyframes m-4-ball
	50%
		opacity: 1
	47.5%, 52.5%
		transform: translateY(10px)
	100%
		transform: translateY(20px)

/* Sixth */
.m-5
	&:before
		width: 10px
		height: 10px
		border-radius: 50%
		top: 10px
		left: calc(50% - 5px)
		border: 2px solid $d
	&:after
		top: 30px
		left: calc(50% - 5px)
		border: 5px solid transparent
		border-top-color: $c
		animation: m-5-arrow 1.2s ease-in-out infinite
	
@keyframes m-5-arrow
	20%, 100%
		transform: translateY(0)
	50%
		transform: translateY(9px)
	80%
		transform: translateY(-3px)

/* General */
html, body
	width: 100%
	height: 100%
	display: flex
	justify-content: center
	align-items: center
	flex-direction: column
	background: radial-gradient(top left, #E0F2F1, #FFF8E1, #FFEBEE)
	font-family: 'Montserrat Alternates', sans-serif
	color: $c

*
	&, &:after, &:before
		box-sizing: border-box

h1
	font-size: 1rem
	margin-top: 0
	margin-bottom: 30px

p
	font-size: .85rem


              
            
!

JS

              
                
              
            
!
999px

Console