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

              
                .sun
	.sun-rays
		- for (var i = 0; i < 36; i++)
			span

              
            
!

CSS

              
                body {
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #111c, #fff0), radial-gradient(circle at 50% 100%, #fff, blue);
}

.sun {
	width: 40vmin;
	height: 40vmin;
	background: #ffa500;
	border-radius: 100%;
	position: absolute;
	border: 0.15vmin dotted #885b09;
	box-sizing: border-box;
	box-shadow: 0 0 25vmin 5vmin #ffa500, 0 0 1vmin 5vmin #ffa500;
	filter: blur(2px);
}

.sun:after {
	content: "";
	position: absolute;
	width: calc(100% + 18vmin);
	height: calc(100% + 18vmin);
	left: -9vmin;
	top: -9vmin;
	background: radial-gradient(circle at 75% 65%, #fe0d -5%, #ff00 50%), radial-gradient(circle at 60% 25%, #fe0d -5%, #ffa500 60%);
	border-radius: 100%;
	filter: blur(3px);
	box-shadow: 0 0 4vmin 3vmin #f908,  0 0 5vmin 3vmin #ffa500 inset;
}

.sun-rays {
	position: absolute;
	width: 80vmin;
	height: 80vmin;
	border-radius: 100%;
	left: -20vmin;
	top: -20vmin;
	display: flex;
	justify-content: center;
	animation: spin 240s linear 0s infinite, shine 5s ease 0s infinite alternate;
}


span {
	position: absolute;
	background: conic-gradient(
		from 170deg at 50% 0, 
		#fff0 0deg, 
		#ffa500 2deg 18deg, 
		#fff0 20deg 359deg, 
		#fff0 360deg);
	width:15vmin;
	height: 50%;
	transform-origin: center bottom;
	filter:
		drop-shadow(3.5vmin 7.5vmin 0vmin #ff9c00)
		drop-shadow(-4vmin 8vmin 0vmin #ff9c00)
		drop-shadow(2.5vmin 5vmin 0vmin #ff9c00) 
		drop-shadow(-2.5vmin 4vmin 0vmin #ff9c00) 
		drop-shadow(0vmin -15vmin 0.95vmin #ffffff05) 
		drop-shadow(0vmin -30vmin 0.75vmin #ffffff05);
}


span {
	@for $i from 1 through 36 {
		&:nth-child(#{$i}) {
			transform: rotate($i * 15deg);
		}
	}
}

@keyframes spin {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes shine {
	100% {
		width: 90vmin;
		height: 90vmin;
		left: -25vmin;
		top: -25vmin;
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console