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

Save Automatically?

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

              
                <header>
	<h1>Meet WordPress</h1>
	<p class="subheading">WordPress is open source software you can use to create a beautiful website, blog, or app.</p>
</header>

<div class="notification">WordPress is also available in Deutsch.</div>


<section class="intro">
	<p class="subheading">Beautiful designs, powerful features, and the freedom to build anything you want. WordPress is both free and priceless at the same time.</p>
	<div class="screenshots"> 
		<img src="http://messislore.com/codepen-imgs/screen-themes.png" class="dashboard" />
		<img src="http://messislore.com/codepen-imgs/iphone-themes.png" class="dashboard-mobile" />
	</div>
</section>

<section class="show">
	<h2>Trusted by the Best</h2>
	<p class="subheading">27% of the web uses WordPress, from hobby blogs to the biggest news sites online.</p>
	<div id="photos">
  <img src="http://messislore.com/codepen-imgs/screen-vogue.png" />
  <img src="http://messislore.com/codepen-imgs/screen-disney.png" />
	<img src="http://messislore.com/codepen-imgs/screen-mercedes.png" />
	<img src="http://messislore.com/codepen-imgs/screen-beyonce-lrg.png" />
	<img src="http://messislore.com/codepen-imgs/screen-sweden-lrg.png" />
	<img src="http://messislore.com/codepen-imgs/screen-bloomberg.png" />
	<img src="http://messislore.com/codepen-imgs/screen-tcho.png" />
	<img src="http://messislore.com/codepen-imgs/screen-techcrunch.png" />
	</div>
	<p class="cta-link"><a href="https://wordpress.org/showcase/">Discover more sites built with WordPress</a>.</p>
</section>

<section class="showcase">
	<h2>Trusted by the Best</h2>
	<p class="subheading">27% of the web uses WordPress, from hobby blogs to the biggest news sites online.</p>
	<div class="collage">
		
	</div>
	<p class="cta-link"><a href="https://wordpress.org/showcase/">Discover more sites built with WordPress</a>.</p>
</section>
	
<section class="features">
	<h2>Powerful Features</h2>
	<p class="subheading">Limitless possibilities. What will you create?</p>
	<ul>
		<li> 
			<span class="dashicons dashicons-admin-customizer"></span>
			Customizable<br />Designs
		</li>
		<li>
			<span class="dashicons dashicons-welcome-widgets-menus"></span>
			SEO<br />Friendly
		</li>
		<li>
			<span class="dashicons dashicons-smartphone"></span>
			Responsive<br />Mobile Sites
		</li>
		<li>
			<span class="dashicons dashicons-chart-line"></span>
			High<br />Performance
		</li>
		<li>
			<a href="https://wordpress.org/mobile/"><img src="http://messislore.com/codepen-imgs/icon-run-blue.svg" />
				Manage<br />on the Go</a>
		</li>
		<li>
			<span class="dashicons dashicons-lock"></span>
			High<br />Security
		</li>
		<li>
			<span class="dashicons dashicons-images-alt2"></span>
			Powerful<br />Media Management
		</li>
		<li>
			<span class="dashicons dashicons-universal-access"></span>
			Easy and<br />Accessible
		</li>
	</ul>
	<p>Extend WordPress with over 45,000 plugins to help your website meet your needs. Add an online store, galleries, mailing lists, forums, analytics, and <a href="https://wordpress.org/plugins/">much more</a>.</p>
</section>

<!-- <section class="community">
	<h2>Community</h2>
	<p class="subheading">Hundreds of thousands of developers, content creators, and site owners gather at monthly meetups in 363 cities worldwide.</p>
	<img src="http://messislore.com/codepen-imgs/meetups-map-white.png">
	<p class="double-links"><a href="http://www.meetup.com/pro/wordpress/">Find a community event near you</a>. <a href="https://make.wordpress.org/">Get involved creating the software</a>.</p>
</section> -->

<section class="community-2">
	<div class="screen"></div>
	<div class="container">
		<h2>Community</h2>
		<p class="subheading">Hundreds of thousands of developers, content creators, and site owners gather at monthly meetups in 363 cities worldwide.</p>
		<button class="button button-seconday button-xl">Find a local WordPress community</button>
	</div>
</section>

<section class="get">
	<h2>Get Started with WordPress</h2>
	<p class="subheading">Over 60 million people have chosen WordPress to power the place on the web they call &ldquo;home&rdquo; — join the family.</p>
	<div class="cta-wrapper">
		<button class="button button-primary button-xl">Get WordPress</button>
	</div>
</section>
              
            
!

CSS

              
                $max-width: 50rem;

img { max-width:100%; }

.notification {
	padding:.5rem;
	background:$color__green;
	text-align:center;
	font-size:ms(-2);
	cursor:pointer;
}
@media ( min-width:67rem ) {
	.notification { margin:1rem auto 0; max-width:$max-width; }
}

.dashicons {
	display:block;
	margin:0 auto -1rem;
	font-size:4rem;
	color:#CBCDCE;
	width:auto;
	height:auto;
}

.cta-wrapper { 
	text-align:center;
	font-size:ms(-1);
	margin:2rem 0 2rem; 
	display:block;
}
@media (min-width: $ms-breakpoint) {
	.cta-wrapper {
		font-size:ms(-2);
		margin: 4rem 0 2rem;
	}
}

.cta-link {
	max-width: 100%;
	text-align: center;
	margin: ms(10) 0 0;
}

header {
	padding: ms(4) ms(1);
	background:$color__wp-blue;
	
	h1 {
		text-align:center;
		color:#FFF;
		line-height:1;
	}
	.subheading {
		color:#FFF;
	}
	
	@media (min-width: $ms-breakpoint) {
		padding: ms(4);
	}
}

section {
	margin:0 auto;
	padding:ms(10) ms(4);
	max-width:$max-width;
	border-bottom:2px solid #EEE;
	
	.container {
		max-width:$max-width;
		margin:0 auto;
		@extend .clearfix;
	}
	h2 { 
		text-align:center; 
		line-height:1;
	}
	&.download { 
		display:none; 
	}
	&.download, &.apps-mobile {
		h2 { 
			margin-top:0rem; 
		}
	}
	&.download-mobile {
		.subheading { 
			margin:0 auto; 
		}
		.cta-wrapper { 
			margin:2rem 0 0; 
		}
	}
	&.apps { 
		display:none; 
	}
	
	@media (min-width: $ms-breakpoint) {
		aside {
			float:left;
			width:30%;
		}
		article {
			float:left;
			width:65%;
		}
		aside + article {
			margin-left:5%;
		}
		article + aside {
			margin-left:5%;
		}
	}
}

.three-up { //hosting section
	@extend .clearfix;
	
	> div {
		margin-top:3rem;
		
		.logo__bluehost, .logo__getlisted, .logo__wpcom { 
			height:35px; 
		}
	}

	@media (min-width: $ms-breakpoint) {
		> div {
			float:left;
			width:30%;
			margin-right:15px;
			font-size:ms(-2);
			&:last-child {
				margin-right:0;
			}
		}
	}
}

.showcase {
	max-width: 100%;
	margin: 0;
	border-bottom: none;
	padding-left: 0;
	padding-right: 0;
	
	> div {
		width: 100%;
		height: 300px;
		background: url(http://messislore.com/codepen-imgs/collage-min.jpg);
		background-size: cover;
		background-attachment: fixed;
		background-position: center top;
		box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
		
		@media(min-width:700px) {
			height: 600px;
		}
	}
}

.show {
	display: none;
	max-width: 100%;
	margin: 0;
	border-bottom: none;
	padding-left: 0;
	padding-right: 0;
}
#photos {
  /* Prevent vertical gaps */
  line-height: 0;
   
  -webkit-column-count: 3;
  -webkit-column-gap:   0px;
  -moz-column-count:    3;
  -moz-column-gap:      0px;
  column-count:         3;
  column-gap:           0px;  
}

#photos img {
  /* Just in case there are inline attributes */
  width: 100% !important;
  height: auto !important;
}

@media (max-width: 800px) {
  #photos {
  -moz-column-count:    2;
  -webkit-column-count: 2;
  column-count:         2;
  }
}


.web-stores { //mobile section
	width:100%;
	margin: 2rem auto 0;
	text-align:center;
	@extend .clearfix;
	
	a { 
		width:150px; 
		display:inline-block; 
		margin:10px;
	}
	
	@media (min-width: $ms-breakpoint) {
		margin: 4rem auto 0;
	}
}
.ios .button-android { display:none; }
.android .button-ios { display:none; }

.features {
	border-top: 2px solid #eee;
	
	p {
		text-align: center;
		margin-left: auto;
		margin-right: auto;
	}
	
	ul {
		list-style: none;
		margin: 3rem 0;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		
		li {
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;
			width: 50%;
			height: 160px;
			text-align: center;
			border-right: 1px solid #eee;
			border-bottom: 1px solid #eee;
			
			a { text-decoration: none; }
			
			@media (max-width:739px) {
				&:nth-child(2n) {
					border-right: none;
				}
				&:nth-child(n+7) {
					border-bottom: none;
				}	
			}
			
			@media (min-width: 740px) {
				width: 25%;
				height: 200px;
				
				&:nth-child(4n) {
				border-right: none;
				}
				&:nth-child(n+5) {
					border-bottom: none;
				}
			}
			
			span, img {
				display: block;
				margin-bottom: 1rem;
				color: #00A0D2;
				font-size: 3rem;
			}
			
			img {
				height: 2.5rem;
				margin: .25rem auto 1.25rem;
			}
		}
	}
}

.community {
	p {
		text-align: center;
		margin-left: auto;
		margin-right: auto;
	}
	
	.meetup-map {
		clip-path: inset(50px 0 50px 0);
		margin: -50px 0;
		
		@media(min-width:700px) {
			clip-path: inset(100px 0 100px 0);
			margin: -100px 0;
		}
	}
}

.community-2 {
	background: url(https://cldup.com/neRLh-dNaj.jpg) no-repeat;
	position: relative;
	max-width: 100%;
	background-size: cover;
	background-position: center top;
	height: 500px;
	border: none;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	flex-direction: column;
	
	.screen {
		background: rgba(0,0,0,0.5);
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		z-index: 0;
		width: 100%;
		height: 100%;
	}
	
	h2, .subheading {
		color: #fff;
		position: relative;
		z-index: 1;
		text-shadow: 0 0 8px rgba(0,0,0,0.5);
		text-align: left;
		margin: 0 0 1rem 0;
		max-width: 100%;
	}
	
	button {
		z-index: 1;
		position: relative;
	}
}

.double-links {
	max-width: 100%;
	
	a:nth-child(2) {
		border-left: 2px solid #eee; margin-left: 20px; padding-left: 20px;
	}
}

.intro {
	padding-bottom: 0;
}
.screenshots {
	height: 400px;
	overflow: hidden;
	//margin-bottom: -40px;
	padding: 1rem 1rem 0 1rem;
	position: relative;
	left: -30px;
	right: 0;
	width: 106%;

	.dashboard {
		box-shadow: 0 1px 8px rgba(0,0,0,0.2);
		max-width: 800px;
	}
	.dashboard-mobile {
		position: absolute;
		bottom: -100px;
		right: 1px;
		z-index: 1;
		//box-shadow: 0 0 12px rgba(0,0,0,0.3);
		max-width: 200px;
	}
}

// Hiding & Showing different content based on screensize
@media (min-width:769px) {
	.apps-mobile, .download-mobile { display:none; }
	section.apps, section.download { display:block; }
}


              
            
!

JS

              
                // OS checker
	var os = navigator.platform;

	$(document).ready(function() {
		if (os == 'iPhone' || os == 'iPod' || os == 'iPad') {
			$('body').addClass('ios');
		} else if (os == 'Android' || os == 'Linux' || os == 'null') {
			$('body').addClass('android');
		} else { };
	});
              
            
!
999px

Console