Pen Settings



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


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


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.


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.


                <div class="slanted">
	<h1>Simple slanted corner</h1>
	<p>Transparent border trick applied on absolutely positioned <code>:after</code> underlying its container which has <code>overflow: hidden</code> to clip out unwanted remainings.</p>
  <p>Slanted bottom part is in fact border-top of <code>:after</code> element with <code>transparent</code> right border.</p>
	<p>Upper rest of container is underlayed with <code>:before</code> which has normal <code>background-color</code> stretched with <code>top/right/bottom/left</code>.</p>


                .slanted {
	position: relative;
	width: 500px;
	padding: 0px 50px 30px 50px;
	overflow: hidden;
  in fact, overflow: hidden is not necessary;
  border: 1px solid transparent;  could fix inner margins as well,
  but to prevent rounding errors it seems better to enlarge borders,
  offset them away and crop with overflow

.slanted::before ,
.slanted::after {
	content: '';
	position: absolute;
	left: 0; 
	z-index: -1; /* = beneath content */
	background-color: #6f9;
	border-color: #6f9;
.slanted::before {
	top: 0;
	right: 0; 
	bottom: 100px; /* = border-top-width of ::after */
.slanted:after { 
	top: auto; 
	right: -5px; /* + some px to mask pixel rounding "crack" that could possibly occur while zoomed */
	bottom: 0;
	border-style: solid;
	border-width: 105px 105px 0 0; /* this is the actual slanted bottom "block" */
	background-color: transparent;
	border-right-color: transparent; /* this is the "notch" */

body {
	background-image: url('data:image/gif;base64,R0lGODlhBAAEAIAAAAAAAERERCH5BAAAAAAALAAAAAAEAAQAAAIGDB5pYBoFADs=');
	font-family: Georgia, serif;