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

              
                <svg xmlns="http://www.w3.org/2000/svg" class="svg-filter">
	<defs>
		<filter id="noise">
			<feOffset in="SourceGraphic" dx="-8" dy="-8" result="offset" />
			<feGaussianBlur in="offset" stdDeviation="64" result="blur" />
			<feTurbulence result="waves" type="turbulence" baseFrequency="0.735 0.771" numOctaves="1" seed="256"></feTurbulence>
			<feDisplacementMap in="blur" in2="waves" scale="320" xChannelSelector="R" yChannelSelector="B" result="ripples"></feDisplacementMap>
			<feComposite in="waves" in2="ripples" operator="arithmetic" k1="1" k2="0" k3="1" k4="0"></feComposite>
		</filter>
	</defs>
</svg>

<div class="wrap">
	<div class="shape noisy"></div>
	<div class="shape gradient"></div>
</div>
<p>Looks best on Retina display.<br>Click anywhere to toggle B&amp;W mode.</p>
              
            
!

CSS

              
                .svg-filter {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
}
.wrap {
	position: relative;
	overflow: hidden;
	
	width: 300px;
	height: 300px;
	
	// border-radius: 50%;
	background: var(--ac, hotpink); // Add an accent colour in the mix
	
	filter: blur(0.33px);
	clip-path: polygon(0 0, 50% 0, 100% 50%, 100% 100%, 50% 100%, 0 50%); // Diamond-ish shape
}

.shape {
	position: absolute;
	top: 0;
	left: 0;
	
	width: 100%;
	height: 100%;
	// border-radius: 50%;

	background: var(--fg, white);
}

.gradient { // Reinforce the "real" gradient ramp
	background: radial-gradient(circle at 100% 100%, var(--fg, white) 10%, 33%, var(--fg-alpha, transparent) 66.7%);
	// opacity: 0.2;
}

.noisy {
	border-radius: 50%; // Matching the radial gradient, kinda smoothes it out a bit
	filter: url("#noise");
}

/* Presentational styles below */
body {
	min-height: 100vh;
	display: grid;
	place-items: center;
	
	color: var(--fg, white);
	background: var(--bg, black);
}

:root {
	--bg: #1d122f;
	--fg: #ffe4c2;
	--fg-alpha: #ffe4c200; // --fg with 00 at the end for alpha=0
	--ac: #ff0196;
}

body.bw {
	--bg: #000000;
	--fg: #ffffff;
	--fg-alpha: #ffffff00; // --fg with 00 at the end for alpha=0
	--ac: #000000;
}

p {
	text-align: center;
}
              
            
!

JS

              
                document.body.onclick = () => document.body.classList.toggle('bw');
              
            
!
999px

Console