123

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              
<div class="container">
	<div class="text">-- Spinners --</div>
	<div class="container--box">
		<div class="box">
			<div class="spinner spinner--1"></div>
		</div>
		<div class="box">
			<div class="spinner spinner--2"></div>
		</div>
		<div class="box">
			<div class="spinner spinner--3"></div>
		</div>
		<div class="box">
			<div class="spinner spinner--4"></div>
		</div>
		<div class="box">
			<div class="spinner spinner--5"></div>
		</div>
		<div class="box">
			<div class="spinner spinner--6"></div>
		</div>
	</div>
</div>
            
          
!
            
              * {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
	width: 100%;
}
body {
	margin: 0;
	padding: 0;
}
.container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	height: 400px;
	width: 600px;
	background: #2184e0;
	box-shadow: 0 0 6px rgba(0, 0, 0, .5), 1px 2px 3px rgba(0, 0, 0, .3);
	display: grid;
	grid-template-rows: 50px 1fr;
}
.container .text {
	background: #fff;
	display: grid;
	justify-items: center;
	align-items: center;
	font-family: sans-serif;
	letter-spacing: 10px;
	text-transform: uppercase;
	font-weight: 800;
	position: relative;
}
.container .text::after {
	content: 'Follow Me';
	position: absolute;
	height: 100%;
	width: 15%;
	right: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	letter-spacing: normal;
	font-weight: 100;
	color: #fff;
	text-transform: none;
	font-size: .8rem;
	background: #222;
	transform-origin: bottom left;
	transition: all 200ms ease-in;
}
.container .text:hover::after {
	background: #e02121;
}
.container--box {
	width: 100%;
	height: 100%;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(2, 1fr);
}
.container--box .box {
	display: grid;
	justify-items: center;
	align-items: center;
	box-shadow: 0 0 1px rgba(0, 0, 0, .8);
}
.container--box .box .spinner {
	height: 40px;
	width: 40px;
	background: rgba(0, 0, 0, .2);
	border-radius: 50%;
}

/* Spinner 1 */

.container--box .box .spinner--1 {
	border-top: 2px solid #fff;
	animation: spinner1 600ms linear infinite;
}
@keyframes spinner1 {
	to {
		transform: rotate(360deg);
	}
}

/* Spinner 2 */

.container--box .box .spinner--2 {
	border: 2px solid rgba(0, 0, 0, 0.4);
	border-top-color: #fff;
	animation: spinner2 600ms linear infinite;
}
@keyframes spinner2 {
	to {
		transform: rotate(360deg);
	}
}

/* Spinner 3 */

.container--box .box .spinner--3 {
	border: 2px solid rgba(0, 0, 0, 0.4);
	border-bottom-color: #fff;
	border-top-color: #fff;
	animation: spinner3 800ms ease infinite;
}
@keyframes spinner3 {
	to {
		transform: rotate(360deg);
	}
}

/* Spinner 4 */

.container--box .box .spinner--4 {
	transform: scale(0);
	background: rgba(0, 0, 0, .8);
	opacity: 1;
	animation: spinner4 800ms linear infinite;
}
@keyframes spinner4 {
	to {
		transform: scale(1.5);
		opacity: 0;
	}
}

/* Spinner 5 */

.container--box .box .spinner--5 {
	border: 2px solid rgba(0, 0, 0, 0.4);
	animation: spinner5 800ms linear infinite;
}
@keyframes spinner5 {
	0% {
		border-radius: 50%;
		transform: rotate(0);
	}
	50% {
		transform: rotate(180deg);
		border-top-left-radius: 10px;
		border-top-right-radius: 10px;
		border-bottom-right-radius: 10px;
		border-bottom-left-radius: 10px;
	}
	100% {
		border-radius: 50%;
		transform: rotate(360deg);
	}
}

/* Spinner 6 */

.container--box .box .spinner--6 {
	border-top: 2px solid #fff;
	border-right: 2px solid transparent;
	animation: spinner6 700ms linear infinite;
}
@keyframes spinner6 {
	to {
		transform: rotate(360deg);
	}
}

            
          
!
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.

Console