cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              -100.times do
	%a{:ontouchstart => true}
%div
            
          
!
            
              * {
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	user-select: none;
}
*, *:before, *:after { box-sizing: border-box; }
*:focus { outline: none!important; }
::selection { background: none; }
body, html { height: 100%; }
body {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: center;
	background: #F76B1C;
	cursor: all-scroll;
	overflow: hidden;
}
div {
	will-change: transform, opacity;
	transition: transform 150ms ease-out;
	opacity: 0;
	animation: fade 250ms ease-out 750ms forwards;
	display: flex;
	align-items: center;
	align-content: center;
	justify-content: center;
	position: absolute;
	z-index: 0;
	top: calc(50% - 30vh);
	left: calc(50% - 20vw);
	width: 40vw;
	height: 60vh;
	// background-color: rgba(white, .2);
	&:before, &:after {
		content: "";
		display: block;
	}
	&:before {
		flex: none;
		width: 80vw;
		height: 80vw;
		min-width: 500px;
		min-height: 500px;
		// background-color: rgba(white, .2);
		// background-color: #FAD961;
		background: radial-gradient(ellipse at center, rgba(#FAD961,1) 0%,rgba(#F76B1C,0) 70%,rgba(#F76B1C,0) 100%);
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FAD961', endColorstr='#00F76B1C',GradientType=1 );
	}
	// &:after {
	// 	position: absolute;
	// 	top: 49%;
	// 	left: 49%;
	// 	width: 2%;
	// 	height: 2%;
	// 	border-radius: 100%;
	// 	background: #F76B1C;
	// }
}
a {
	position: relative;
	z-index: 1;
	width: 10vw;
	height: 10vh;
	// border: 1px dashed rgba(white, .1);
	@for $i from 1 through 10 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 1) * 10}, -45vh);
				}
			}
		}
	}
	@for $i from 11 through 20 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 11) * 10}, -35vh);
				}
			}
		}
	}
	@for $i from 21 through 30 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 21) * 10}, -25vh);
				}
			}
		}
	}
	@for $i from 31 through 40 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 31) * 10}, -15vh);
				}
			}
		}
	}
	@for $i from 41 through 50 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 41) * 10}, -5vh);
				}
			}
		}
	}
	@for $i from 51 through 60 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 51) * 10}, 5vh);
				}
			}
		}
	}
	@for $i from 61 through 70 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 61) * 10}, 15vh);
				}
			}
		}
	}
	@for $i from 71 through 80 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 71) * 10}, 25vh);
				}
			}
		}
	}
	@for $i from 81 through 90 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 81) * 10}, 35vh);
				}
			}
		}
	}
	@for $i from 91 through 100 {
		&:nth-child(#{$i}) {
			&:hover, &:focus {
				~ div {
					transform: translate(#{-45vw + ($i - 91) * 10}, 45vh);
				}
			}
		}
	}
}

@keyframes fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
            
          
!
            
              // ⟁ \\
// I got inspired by Leo Sammarco's pen (https://codepen.io/lsammarco/pen/waMpJw) and decided to try a CSS-only version!
// This doesn't animate the background radial gradient, but rather, it animates the transform of the gradient element.
// The math is still a little wonky lol
// It would be smoother with more links but also would take longer to load, so I only used 100 instead of something like 1000.
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console