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-fluid page-title">
	<h1>The Exploded Grid</h1>
	<hr/>
</div>

<section class="grid-4">
	<div class="container-fluid">
		<div class="row">
			
			<div class="col-sm-6 col-sm-push-6">
				<div class="image-mask">
					<div class="clearfix"><img src="https://images.unsplash.com/photo-1472663532343-11bf2c521ff9?dpr=1&auto=format&crop=entropy&fit=crop&w=500&h=600&q=80&cs=tinysrgb"/></div>
				</div>
			</div>
			<div class="col-sm-6 col-sm-pull-6">
				<div class="caption">
					<h1>Eum quaerendum instructior ut</h1>
					<hr />
					<p>Lorem ipsum dolor sit amet, ius no mentitum moderatius intellegam, ea usu zril aliquid disputando. Enim numquam pro ne. Ea nobis aperiam usu, pro nibh liber recteque ne, an tempor verterem cum. Mea nominati reprimique ut, eu duo maiorum invidunt. Ut ius utinam suscipit facilisi, vel quot soleat ut.</p>
				</div>
			</div>
		</div>
	</div>
</section>
<div class="container-fluid grid-2">
	<div class="row">
		<div class="col-sm-3">
			<img src="https://images.unsplash.com/photo-1473881823110-d94cac66318a?dpr=1&auto=format&crop=entropy&fit=crop&w=600&h=750&q=80&cs=tinysrgb" class="feature-1" />
		</div>
		<div class="col-sm-3 hidden-xs"><img src="https://images.unsplash.com/photo-1465685518359-087728c479e6?dpr=1&auto=format&crop=entropy&fit=crop&w=400&h=400&q=80&cs=tinysrgb" class="feature-2" />
		</div>
		<div class="col-sm-3">
			<div class="text-block"><p>
				Lorem ipsum dolor sit amet, ius no mentitum moderatius intellegam, ea usu zril aliquid disputando. Enim numquam pro ne. Ea nobis aperiam usu, pro nibh liber recteque ne, an tempor verterem cum. Mea nominati reprimique ut, eu duo maiorum invidunt. Ut ius utinam suscipit facilisi, vel quot soleat ut.
				</p>
				<p>Graeci persecuti complectitur his cu, ex has facilisis laboramus. Impetus incorrupte cu est, id sit amet theophrastus. Ut per ancillae percipit consulatu, molestiae repudiandae vim no, vel possim partiendo cu. Quo civibus consetetur complectitur cu, pri ex utroque civibus.</p>
				<hr /></div>
		</div>
		<div class="col-sm-3 hidden-xs">
			<img src="https://images.unsplash.com/photo-1455100624998-cbee3a9eab8a?dpr=1&auto=format&crop=entropy&fit=crop&w=500&h=300&q=80&cs=tinysrgb" class="feature-3" />
			<h1>PG</h1>
		</div>
	</div>
</div>

<section class="triangle-alt-">
	<div class="container-fluid grid-1">
		<div class="row">
			<div class="col-sm-6 col-sm-push-6">
				<div class="image-mask"><img src="https://images.unsplash.com/photo-1473881823110-d94cac66318a?dpr=1&auto=format&crop=entropy&fit=crop&w=600&h=760&q=80&cs=tinysrgb" /></div>
			</div>
			
			<div class="col-sm-6 col-sm-pull-6">
				<h1>Eum quaerendum instructior ut</h1>
				<hr />
				<p>Lorem ipsum dolor sit amet, ius no mentitum moderatius intellegam, ea usu zril aliquid disputando. Enim numquam pro ne. Ea nobis aperiam usu, pro nibh liber recteque ne, an tempor verterem cum. Mea nominati reprimique ut, eu duo maiorum invidunt. Ut ius utinam suscipit facilisi, vel quot soleat ut.
				</p><p>
				Causae mediocrem ius te, eos ei quis saperet instructior. Exerci fabulas splendide an has. Alterum expetendis sadipscing in has, mel ad legere vivendo efficiantur. Vis ne facer neglegentur. Assum homero disputando eum cu, vis saperet volutpat definiebas ea. Ignota salutandi iracundia no mea.
				</p><p>
				Graeci persecuti complectitur his cu, ex has facilisis laboramus. Impetus incorrupte cu est, id sit amet theophrastus. Ut per ancillae percipit consulatu, molestiae repudiandae vim no, vel possim partiendo cu. Quo civibus consetetur complectitur cu, pri ex utroque civibus.
				</p><p>
				Ut nec vitae tempor probatus, inani atomorum eum ex. Enim intellegat te qui. Eu nobis deterruisset mea, eam in autem liber nonumy. Est enim cetero eu, integre docendi ancillae eam ea.
				</p><p>
				<a href="#" class="btn btn-brand">Autem liber nonumy</a></p>

			</div>
		</div>
	</div>
</section>
              
            
!

CSS

              
                $brand-primary: tomato;
$sm: 768px;
$serif: 'Playfair Display', serif;

@mixin grayscale($amount:100%) {
	-webkit-filter: grayscale($amount); /* Chrome, Safari, Opera */
	filter: grayscale($amount);
}

::selection {
	background:$brand-primary;
	color: #fff;
}

.page-title {
	h1 {
		text-align:center;
		font-family:$serif;
		font-weight:900;
		font-size:2.75em;	
		
		@media (min-width: $sm) {
			font-size:5.5em;
		}
	}
}
.container-fluid {
	max-width: 1000px;
		
	@media (min-width: $sm) {
		padding-top: 30px;
		padding-bottom: 30px;
	}
	
	.btn-brand {
		border-radius: 0;
		color: #fff;
		background: $brand-primary;
		border-color: $brand-primary;
		border: 2px solid $brand-primary;
		font-weight: bold;
		text-transform: uppercase;
		padding: 10px 18px;

		&:hover, &:focus {
			background: transparent;
			color: $brand-primary;
		}
	}
	
	hr {
		border-top:3px solid $brand-primary;
		width:20%;
	}
	
	img {
		height:auto;
	}

	&.grid-1 {
		
		img {
			width: 100%;
		}
		
		.image-mask {
			opacity:0.9;
			
			img {
				@include grayscale;
			}
		}
		

		h1 {
			text-align:right;
			position:relative;
			display:block;
			font-family:$serif;
			font-weight:900;
			z-index:1;
			
			@media (min-width: $sm) {
				width:120%;
				padding-left:20%;
				margin-right:-20%;
			}
		}

		p {
			text-align:right;
			line-height:1.55em;
			margin-bottom: 0.95em;
		}

		hr {
			margin-right:0;
		}
	}
	
	&.grid-2 {
		max-width: 1400px;
		
		img {
			width:100%;
			
			&.feature-1 {
				@include grayscale;
				width:100%;
		
				@media (min-width: $sm) {
					width:130%;
					margin-top:30%;
				}
			}
			
			&.feature-2 {
				margin-top:115%;
				width:120%;
				float:right;
				@include grayscale;
			}
			
			&.feature-3 {
				width:170%;
				float:right;
				margin-top:0;
				margin-bottom:-27%;
				@include grayscale;
			}
		}
		
		.text-block {
			margin-top:15px;
			@media (min-width: $sm) {
				margin-top:115%;
			}
		}
		
		h1 {
			//margin-top:-50%;
			font-size:10em;
			color: $brand-primary;
			position:relative;
			z-index:2;
			font-family:$serif;
			font-weight:900;
		}
		
		hr {
			margin-left:0;
		}
	}
}

.grid-4 {
	background:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/110232/triangle.svg'),
		url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/110232/triangle-alt.svg'), url('https://prismic-io.s3.amazonaws.com/maydesigns%2F28e5b5b8-771a-440a-9f20-4a5275f55b80_march-2016-desktop-marble-peach.jpg');
	background-repeat:no-repeat, no-repeat;
	background-size: 100% 50%, 100% 50%, cover;
	background-position:top left, bottom left, center center;
	background-attachment: scroll, scroll, fixed;
	//height:100vh;
	padding-bottom:30%;
	margin-bottom:-25%;
	
	.caption {
		background: #fff;
		padding: 40px 70px 40px 40px;
		position:relative;
		margin-top:15px;
		
		@media (min-width: $sm) {
			margin-top:20%;
		}
		
		h1 {
			font-family:$serif;
			font-weight:900;
			margin:0;
		}
		
		hr {
			margin-left:0;
		}
		
		&:after {
			position:absolute;
			top:20px;
			bottom:20px;
			left:20px;
			right:20px;
			content:"";
			border: $brand-primary 3px solid;
			z-index:3;
		}
	}
	
	img {
		@include grayscale;
		width:100%;
		
		@media (min-width: $sm) {
			width: 120%;
			float:right;
		}
	}
	
	.image-mask {
		position:relative;
		
		img {
			position:relative;
			z-index:1;
		}
		
		&:after {
			position:absolute;
			top: 20px;
			left:0;
			bottom:-10px;
			right:-10px;
			display:block;
			background: #fff;
		
			@media (min-width: $sm) {
				content:"";
			}
		}
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console