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="wrapper">
	<div class="mainbox">
		<div class="addbox addbox1"></div>
		<div class="divider"></div>
		<div class="addbox addbox2"></div>
		<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam ex laboriosam repellat porro earum nisi consequatur distinctio facere dolor autem?</p>
	</div>
</div>

              
            
!

CSS

              
                .wrapper
	display: flex
	justify-content: center
	align-items: center
	margin: 4em auto
	
.mainbox
	width: 50%
	height: 300px
	background: #000
	margin-left: 50px
	color: #fff
	position: relative
	border-radius: 0 5px 5px 0
	
.addbox
	background: red
	width: 50px
	max-height: 42%
	height: 42%
	position: absolute
	z-index: 2
	transform: translateX(-100%)
.addbox1
	top: 0
	border-radius: 5px 0 0 0
	&:before
		position: absolute
		content: ''
		border: 25px solid transparent
		border-top: 25px solid green
		border-right: 25px solid green
		bottom: 0
		transform: translateY(100%)
.addbox2
	bottom: 0
	border-radius: 0 0 0 5px
	&:before
		position: absolute
		content: ''
		border: 25px solid transparent
		border-right: 25px solid green
		border-bottom: 25px solid green
		transform: translateY(-100%)
	
.divider
		position: absolute
		width: 30px
		height: 8px
		background: blue
		left: -21px
		border-radius: 5px
		transform: translateX(-100%) rotate(45deg)
		top: 46%
	
		
              
            
!

JS

              
                
              
            
!
999px

Console