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="frame">
<div class="ball">
	
	<div class="slice s1"></div>
		<div class="slice s2"></div>
		<div class="slice s3"></div>
		<div class="slice s4"></div>
		<div class="slice s5"></div>
		<div class="slice s6"></div>
		<div class="slice s7"></div>
		<div class="slice s8"></div>
		<div class="slice s9"></div>
		<div class="slice s10"></div>
		<div class="slice s11"></div>
		<div class="slice s12"></div>
</div>
</div>
              
            
!

CSS

              
                * {
	box-sizing: border-box;
}

.frame {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 400px;
	height: 400px;
	margin-top: -200px;
	margin-left: -200px;
	border-radius: 2px;
	box-shadow: 4px 8px 16px 0 rgba(0, 0, 0, 0.1);
	overflow: hidden;
	background: radial-gradient(circle, #bee9e8 40%, #cae9ff);
	color: #333;
	font-family: "Open Sans", Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	display: flex;
	justify-content: center;
	align-items: center;
	perspective: 3000;
}

.ball {
	width: 200px;
	height: 200px;
	border-radius: 50%;
	position: relative;
	transform-style: preserve-3d;
	animation: ballani 15s infinite alternate ease;
}

@keyframes ballani {
	1% {
		transform: rotateX(0deg) rotateY(0deg);
	}
	15% {
		transform: rotateX(180deg) rotateY(0deg);
	}

	30% {
		transform: rotateX(500deg) rotateY(100deg);
	}
	60% {
		transform: rotateX(50deg) rotateY(-190deg);
	}
	70% {
		transform: rotateX(90deg) rotateY(180deg) rotateZ(0deg);
	}
	90% {
		transform: rotateX(80deg) rotateY(180deg) rotateZ(700deg);
	}
	100% {
		transform: rotateX(90deg) rotateY(360deg) rotateZ(720deg);
	}
}

.slice {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 3px #1b4965 solid;
}

.s1 {
	transform: rotateY(30deg);
	background-color: #bee9e833;
}
.s2 {
	transform: rotateY(60deg);
	background-color: #62b6cb33;
}
.s3 {
	transform: rotateY(90deg);
	background-color: #3f809833;
}
.s4 {
	transform: rotateY(120deg);
	background-color: #1b496533;
}
.s5 {
	transform: rotateY(150deg);
	background-color: #cae9ff33;
}
.s6 {
	transform: rotateY(180deg);
	background-color: #5fa8d333;
}
.s7 {
	transform: rotateY(210deg);
	background-color: #bee9e833;
}
.s8 {
	transform: rotateY(240deg);
	background-color: #62b6cb33;
}
.s9 {
	transform: rotateY(270deg);
	background-color: #3f809833;
}
.s10 {
	transform: rotateY(300deg);
	background-color: #1b496533;
}
.s11 {
	transform: rotateY(330deg);
	background-color: #5fa8d333;
}
.s12 {
	transform: rotateY(360deg);
	background-color: #cae9ff33;
}

              
            
!

JS

              
                // One of my favourites
// Twitter @Richard2957
// Inspiration https://100dayscss.com/days/75/
              
            
!
999px

Console