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

              
                <main>

	<section id="section-one">
		<h2>Section one</h2>
	</section>

	<section id="section-two">
		<h2>Section two</h2>
	</section>

	<section id="section-three">
		<h2>Section three</h2>
	</section>

	<section id="section-four">
		<h2>Section four</h2>
	</section>
	
	<section id="section-five">
		<h2>Section five</h2>
	</section>
	
	<section id="section-six">
		<h2>Section six</h2>
	</section>
	
	<section id="section-seven">
		<h2>Section seven</h2>
	</section>
	
</main>
              
            
!

CSS

              
                body, body *
  transform-style preserve-3d
html,body
	width 100%
	height 100%
	margin 0
body
	font-family sans-serif
h2
	margin-top 0.5rem
	margin-bottom 2rem
main
	height 100vh
	perspective 1px
	overflow auto
	position relative
section
	width 20vw
	min-width 200px
	height 30vh
	padding 2rem
	box-sizing border-box
	position absolute
	&#section-one
		top 100px
		left 10px
		background-color lightsalmon
		transform translateZ(-0.4px)
	&#section-two
		top 300px
		left 65vw
		background-color lightcoral
		transform translateZ(0.2px)
	&#section-three
		top 800px
		left 30vw
		background-color lightpink
		transform translateZ(-0.3px)
	&#section-four
		background-color lightblue
		top 750px
		left 45vw
		z-index 2
		transform translateZ(0.4px)
		z-index -1
	&#section-five
		top 600px
		left 50vw
		background-color yellowgreen
		transform translateZ(0.6px)
	&#section-six
		top 500px
		left 25vw
		background-color lightgreen
		transform translateZ(0.2px)
	&#section-seven
		top 1000px
		left 12vw
		background-color blueviolet
		transform translateZ(-0.2px)
              
            
!

JS

              
                
              
            
!
999px

Console