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="center">
		<div class="circle">
			<div class="sky"></div>
			<div class="skyGradient"></div>
			<div class="star star1"></div>
			<div class="star star2"></div>
			<div class="star star3"></div>
			<div class="star star4"></div>
			<div class="star star5"></div>
			<div class="sun"></div>
			<div class="pyramid"></div>
			<div class="pyramidShade"></div>
			<div class="land"></div>
			<div class="shadow"></div>
			<div class="landDepth"></div>
		</div>
	</div>
</div>
              
            
!

CSS

              
                .frame {
	position: absolute;
	top: 50%;
	left: 50%;
	clip-path: polygon(
		30% 0%,
		70% 0%,
		100% 30%,
		100% 70%,
		70% 100%,
		30% 100%,
		0% 70%,
		0% 30%
	);
	background: black;
	width: 400px;
	height: 400px;
	margin-top: -200px;
	margin-left: -200px;
	border-radius: 2px;
	box-shadow: 4px 8px 16px 0 rgba(0, 0, 0, 0.7);
	overflow: hidden;
	background: #fff;
	color: #333;
	font-family: "Open Sans", Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

	background: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
}

.center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.circle {
	position: relative;
	width: 337px;
	height: 337px;
	border-radius: 50%;
	overflow: hidden;
}

.sky {
	position: absolute;
	width: 100%;
	height: 70%;
	background: #6700f9;
	animation: skyKeyframes 8s 1s linear infinite;
}

.skyGradient {
	position: absolute;
	widht: 100%;
	bottom: 30%;
	animation: skyGradientKeyframes 8s 1s linear infinite;
	mask-image: linear-gradient(to top, #ffff, transparent 100%);
}

.star {
	position: absolute;
	width: 1px;
	height: 1px;
	border-radius: 50%;
	background: white;
	box-shadow: 0 0 4px #666;
	mix-blend-mode: lighten;
}

.star1 {
	left: 27%;
	top: 21%;
	animation: starKeyframes 0.2s ease-in-out infinite;
}
.star2 {
	left: 76%;
	top: 15%;
	animation: starKeyframes 0.3s 0.7s ease-in-out infinite;
}
.star3 {
	left: 44%;
	top: 23%;
	animation: starKeyframes 0.23s 0.5s ease-in-out infinite;
}
.star4 {
	left: 82%;
	top: 40%;
	animation: starKeyframes 0.18s 0.3s ease-in-out infinite;
}
.star5 {
	left: 22%;
	top: 32%;
	animation: starKeyframes 0.38s 0.2s ease-in-out infinite;
}

.sun {
	position: absolute;
	top: 50%;
	left: 15%;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	transform-origin: 120px 40px;
	animation: sunKeyframes 8s 1s linear infinite;
}

.pyramid {
	position: absolute;
	left: 25%;
	bottom: 30%;
	clip-path: polygon(51% 33%, 0% 100%, 100% 100%);
	border: solid 80px transparent;
	border-bottom-color: #050301;
	animation: pyramidKeyframes 8s 1s linear infinite;
}

.pyramidShade {
	position: absolute;
	left: 25%;
	bottom: 30%;
	border: solid 80px transparent;
	border-bottom-color: #211706;
	transform-origin: right bottom;
	transform: scaleX(0.364) skewX(60deg);
	animation: pyramidSideKeyframes 8s 1s linear infinite;
}

.land {
	position: absolute;
	width: 100%;
	top: 70%;
	bottom: 0;
	animation: landKeyframes 8s 1s linear infinite;
	background: black;
}

.shadow {
	position: absolute;
	left: 25%;
	top: 70%;
	border: solid 80px transparent;
	transform-origin: top left;
	animation: shadowKeyframes 8s 1s linear infinite;
	mix-blend-mode: multiply;
}

.landDepth {
	position: absolute;
	width: 100%;
	top: 70%;
	bottom: 0;
	background: linear-gradient(to bottom, #fff);
	opacity: 0.4;
}

@keyframes skyKeyframes {
	0% {
		background: #280060;
	}
	3% {
		background: #4b00b5;
	}
	6% {
		background: #6c7af5;
	}
	9% {
		background: #67cdff;
	}
	12% {
		background: #80b8f7;
	}
	20% {
		background: #6bf;
	}
	50% {
		background: #8cf;
	}
	80% {
		background: #5900d7;
	}
	90% {
		background: #4b00b5;
	}
	95% {
		background: #360082;
	}
	100% {
		background: #280060;
	}
}

@keyframes skyGradientKeyframes {
	0% {
		background: #f004;
		height: 3%;
		mix-blend-mode: add;
	}
	4% {
		background: #f008;
		height: 4%;
	}
	6% {
		background: #fc82;
		height: 8%;
	}
	14% {
		background: #fff0;
		height: 20%;
	}
	50% {
		mix-blend-mode: add;
	}
	51% {
		mix-blend-mode: multiply;
	}
	88% {
		background: #0000;
		height: 20%;
	}
	98% {
		background: #000c;
		height: 70%;
		mix-blend-mode: multiply;
	}
}

@keyframes sunKeyframes {
	0% {
		left: 28%;
		top: 70%;
		background: #f20;
		transform: rotate(-15deg) scale(1.5);
		box-shadow: 0 0 64px 8px #f20;
	}
	5% {
		backgorund: #f60;
		box-shadow: 0 0 48px 8px #f80;
	}
	10% {
		background: #ff2;
	}
	15% {
		background: #ffc;
		box-shadow: 0 0 24px #ff2;
	}
	25% {
		box-shadow: 0 0 24px #ffc;
	}
	50% {
		left: 10%;
		top: 5%;
		transform: rotate(105deg) scale(1);
		background: #fff;
		opacity: 1;
	}
	100% {
		left: 10%;
		top: 5%;
		transform: scale(1) rotate(105deg);
		background: #fff;
		box-shadow: 0 0 24px #ffc;
		opacity: 0;
	}
}

@keyframes pyramidKeyframes {
	0% {
		border-bottom-color: #001;
	}
	2% {
		border-bottom-color: #412;
	}
	4% {
		border-bottom-color: #853;
	}
	12% {
		border-bottom-color: #b4b29c;
	}
	18% {
		border-bottom-color: #d8d0b0;
	}
	32% {
		border-bottom-color: #d9d1b1;
	}
	40% {
		border-bottom-color: #e9e1c1;
	}
	87% {
		border-bottom-color: #a8a0a0;
	}
	90% {
		border-bottom-color: #a84;
	}
	93% {
		border-bottom-color: #b43;
	}
	96% {
		border-bottom-color: #224;
	}
}

@keyframes pyramidSideKeyframes {
	0% {
		border-bottom-color: #001;
	}
	2% {
		border-bottom-color: #312;
	}
	4% {
		border-bottom-color: #753;
	}
	14% {
		border-bottom-color: #a4a898;
	}
	32% {
		border-bottom-color: #b4b6a4;
	}
	40% {
		border-bottom-color: #f8f0e0;
	}
	87% {
		border-bottom-color: #f0e6d0;
	}
	90% {
		border-bottom-color: #eb4;
	}
	93% {
		border-bottom-color: #c54;
	}
	96% {
		border-bottom-color: #324;
	}
}

@keyframes landKeyframes {
	0% {
		background: #112;
	}
	3% {
		background: #512;
	}
	6% {
		background: #643;
	}
	10% {
		background: #986;
	}
	15% {
		background: #ddce99;
	}
	85% {
		background: #ddbe79;
	}
	88% {
		background: #da7;
	}
	92% {
		background: #b64;
	}
	94% {
		background: #324;
	}
}

@keyframes shadowKeyframes {
	0% {
		transform: skewX(88deg);
		border-top-color: #0366;
	}
	32% {
		border-top-color: #2466;
	}
	35% {
		border-top-color: #fff0;
		transform: skewX(75deg) scaleY(0);
		opacity: 0;
	}
}

@keyframes starKeyframes {
	50% {
		opacity: 0.5;
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console