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">
	<div class="left"></div>
	<div class="right"></div>
	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Placerat orci nulla pellentesque dignissim enim sit. Ut etiam sit amet nisl purus in mollis nunc. Donec et odio pellentesque diam volutpat commodo sed. Tortor at auctor urna nunc id cursus metus aliquam. Egestas integer eget aliquet nibh praesent. Montes nascetur ridiculus mus mauris vitae ultricies. Nunc aliquet bibendum enim facilisis gravida neque convallis a. Gravida neque convallis a cras semper auctor neque vitae tempus. Tortor pretium viverra suspendisse potenti nullam ac tortor vitae purus. Feugiat in fermentum posuere urna nec tincidunt praesent semper feugiat. Etiam dignissim diam quis enim lobortis. Tellus cras adipiscing enim eu turpis. Fames ac turpis egestas sed tempus urna et. Massa tincidunt dui ut ornare lectus sit amet. Eget sit amet tellus cras adipiscing enim eu turpis egestas. Aenean vel elit scelerisque mauris pellentesque pulvinar pellentesque. Phasellus egestas tellus rutrum tellus pellentesque eu tincidunt tortor.</p>
	<div class="shadow"></div>
</div>
<div class="shadow2"></div>
              
            
!

CSS

              
                * {
	box-sizing: border-box;
}

body {
	background: repeating-linear-gradient(45deg, rebeccaPurple, rebeccaPurple 6px, #FFB74D 6px, #FFB74D 18px);
	min-height: 100vh;
	padding: 30px;
}

.container {
	background: linear-gradient(to top, rebeccaPurple, coral);
	height: 600px;
	clip-path: polygon(50% 0, 75% 50%, 50% 100%, 25% 50%);
	position: relative;
}

.left,
.right {
	shape-margin: 20px;
	position: relative;
	height: 600px;
	width: 50%;
}

.left {
	float: left;
	clip-path: polygon(0 0, 100% 0, 50% 50%, 100% 100%, 0 100%);
	shape-outside: polygon(0 0, 100% 0, 50% 50%, 100% 100%, 0 100%);
	transform: translate3d(-20px, 0, 0);
}

.right {
	float: right;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 50% 50%);
	shape-outside: polygon(0 0, 100% 0, 100% 100%, 0 100%, 50% 50%);
	transform: translate3d(-20px, 0, 0);
}

.shadow {
	display: block;
	content: '';
	width: 100%;
	height: 100%;
	background: linear-gradient(to bottom, rgba(rebeccaPurple, 0.2), darken(blue, 9%));
	position: absolute;
	top: 0;
	left: 0;
	transform: translate3d(0, 50%, 0);
	clip-path: circle(200px);
	height: 600px;
}

.shadow2 {
	display: block;
	content: '';
	width: 100%;
	height: 600px;
	background-color: rebeccaPurple;
	position: absolute;
	top: 0;
	left: 0;
	z-index: -1;
	transform: translate3d(0, 80px, 0);
	clip-path: polygon(50% 0, 75% 50%, 50% 100%, 25% 50%);
	height: 600px;
}
              
            
!

JS

              
                
              
            
!
999px

Console