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 id="app">
	<header><h1>Some text</h1></header>
	<div class="grid">
		<div class="gridBlock">
			<img src='https://images.pexels.com/photos/33283/stack-of-books-vintage-books-book-books.jpg' alt='img' /> 
		</div>
		<div class="gridBlock">
			<img src='https://images.pexels.com/photos/997721/pexels-photo-997721.jpeg' alt='img' />
		</div>
		<div class="gridBlock">
			<img src='https://images.pexels.com/photos/277319/pexels-photo-277319.jpeg' alt='img' />		
		</div>
		<div class="gridBlock">
				<img src='https://images.pexels.com/photos/433098/pexels-photo-433098.jpeg?auto=compress&cs=tinysrgb&h=650&w=940' alt='img' />
		</div>
		<div class="gridBlock">
			<img src='https://images.pexels.com/photos/555869/pexels-photo-555869.jpeg' alt='img' />
		</div>
		<div class="gridBlock">
				<img src='https://images.pexels.com/photos/1213922/pexels-photo-1213922.jpeg' alt='img' />
		</div>
		<div class="gridBlock">
				<img src='https://images.pexels.com/photos/1213922/pexels-photo-1213922.jpeg' alt='img' />
		</div>
		<div class="gridBlock"></div>
		<div class="gridBlock"></div>
	</div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Russo+One)
*
	box-sizing: border-radius
img
	max-width: 100%
	height: auto
body
	font-family: Russo One, sans-serif
#app
	width: 100%
	height: 100vh
	overflow: hidden
	position: relative
	background: url(https://images.pexels.com/photos/216600/pexels-photo-216600.jpeg?auto=compress&cs=tinysrgb&h=650&w=940) 50% 50% no-repeat
	background-size: cover
header 
	position: absolute
	left: 4vw
	top: 6vw
	width: 60vw
	h1
		font-size: 4em
		margin: 0
		padding: 0
		letter-spacing: 0.1em
		text-transform: uppercase
		background: -webkit-linear-gradient(transparent, transparent), url(https://images.pexels.com/photos/675977/blue-sky-merge-clouds-675977.jpeg?auto=compress&cs=tinysrgb&h=650&w=940) 50% 50% repeat-x
		color: transparent
		-webkit-text-fill-color: transparent
		-webkit-background-clip: text
.grid
	width: 60vw
	height: 60vw
	padding-left: 4vw
	padding-bottom:  4vw
	border-left: 3vw solid #fff
	border-bottom: 3vw solid #fff
	display: grid
	grid-template-columns: repeat(3, 1fr)
	grid-template-rows: repeat(3, 1fr)
	grid-gap: 4vw
	transform: rotate(-45deg) translate(40%, 20%)
	transform-origin: 100% 0%
	.gridBlock
		border: 1px solid #fff
		overflow: hidden
		background: #fff
		position: relative
		img
			position: absolute
			top: -20%
			left: -60%
			max-width: 200%
			width: 200%
			height: auto
			transform: rotate(45deg)
			filter: grayscale(100%)
			transition: all .7s ease-in
			&:hover
				transform: rotate(45deg) scale(1.3)
				filter: grayscale(0)
	
              
            
!

JS

              
                
              
            
!
999px

Console