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="container">
	<h1>Hello</h1>
	<p>This is a call.</p>
	<p class="reveal">What's up, people?</p>

	<svg class="tall" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 1000 200">
		<path fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="4" d="M0 46c45.5 0 45.5 108 90.9 108 45.5 0 45.5-108 90.9-108 45.5 0 45.5 108 90.9 108 45.5 0 45.5-108 90.9-108 45.5 0 45.5 108 90.9 108C500 154 500 46 545.4 46c45.5 0 45.5 108 90.9 108 45.5 0 45.5-108 90.9-108 45.5 0 45.5 108 90.9 108 45.5 0 45.5-108 90.9-108 45.5 0 45.5 108 90.9 108" />
		<path fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="4" d="M1020 90c15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20s15.2 20 30.3 20c15.2 0 15.2-20 30.3-20 15.1 0 15.1 20 30.3 20 15.1 0 15.1-20 30.3-20 15.1 0 15.1 20 30.3 20 15.1 0 15.1-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.1 0 15.1-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.1 0 15.1 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20 15.2 0 15.2 20 30.3 20 15.2 0 15.2-20 30.3-20s15.2 20 30.3 20" />
	</svg>

	<svg class="short" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 400 100">
		<path fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2" d="M0 46c6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8 6.1 0 6.1-8 12.1-8 6.1 0 6.1 8 12.1 8" />
	</svg>
</div>
              
            
!

CSS

              
                :root {
	--path_color1: #bada55;
	--color1: #a8ff78;
	--color2: #78ffd6;
	--gray: #333;
	--dark_gray: #333;
}

* {
	box-sizing: border-box;
}

body {
	background-color: var(--gray);
	color: var(--dark_gray);
	font-family: sans-serif;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
}

body h1,
body p {
	z-index: 100;
	transition: transform 1s ease-in-out;
}

/* Demo styles */
h1 {
	font-size: 4.5rem;
	font-weight: bold;
	transform: translateY(10px);
}

p {
	font-size: 1rem;
	transform: translateY(10px);
}

p.reveal {
	opacity: 0;
	margin-top: 1rem;
	font-size: 1.2rem;
	transition: all 1s ease-in-out;
}

.container {
	position: relative;
	width: 300px;
	padding: 40px 20px;
	border-radius: 1rem;
	background: var(--color1);
	/* fallback for old browsers */
	background: -webkit-linear-gradient(to bottom, var(--color2), var(--color1));
	/* Chrome 10-25, Safari 5.1-6 */
	background: linear-gradient(to bottom, var(--color2), var(--color1));
	/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

	transition: transform 0.5s ease-in-out, box-shadow 0.4s ease-in-out;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	overflow: hidden;
	aspect-ratio: 1/1;
	box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.8);
}

svg {
	width: 1000px;
	position: absolute;
	top: 50%;
	left: 0;
	opacity: 0.2;
	mix-blend-mode: multiply;
	transition: left 1s ease-in-out;
	z-index: 0;

	path {
		stroke: var(--path_color1);
	}
}

svg.short {
	top: 40%;
	width: 700px;
}

svg.tall {
	top: 30%;
}

/* Hover effects */
.container:hover {
	cursor: pointer;
	transform: scale(1.02);
	box-shadow: 0 60px 80px rgba(0, 0, 0, 0.6), 0 45px 26px rgba(0, 0, 0, 0.14);

	& > * {
		transform: translateY(-10px);
	}

	p.reveal {
		opacity: 1;
	}

	svg.short {
		left: -300px;
	}

	svg.tall {
		left: -100px;
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console