Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <header role="banner">
	<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/siren-logo.jpg" width="189" height="53"/>
</header>
<div class="hero" data-hero>
	<div class="slider">
		<div class="slide">
			<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/canyon.jpg" />
			<div class="content">
				<h2><a href="#">Arizona Ultimate Adventure - Grand Canyon &amp; Beyond</a></h2>
				<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
			</div>
		</div>
		<div class="slide">
			<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/azerbaijan-2.jpg" />
			<div class="content">
				<h2><a href="#">The World&rsquo;s Last Great Undiscovered Cuisine</a></h2>
				<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
			</div>
		</div>
		<div class="slide">
			<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/apple-2.jpg" />
			<div class="content">
				<h2><a href="#">Has Apple Forgotten The Creative Professionals?</a></h2>
				<div class="meta"><span class="category">Technology</span> / <span class="date">August 21 2017</span></div>
			</div>
		</div>
	</div>
	<div class="feature">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/soundcloud.jpg" />
		<div class="content">
			<h2><a href="#">The SoundCloud You Loved is Doomed</a></h2>
			<div class="meta"><span class="category">Music</span> / <span class="date">August 21 2017</span></div>
		</div>
	</div>
	<div class="feature">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/oneweb.jpg" />
		<div class="content">
			<h2><a href="#">OneWeb vouches for high reliablity of its deorbit system</a></h2>
			<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
		</div>
	</div>
</div>

<section class="the-latest">
	<h2>The Latest</h2>
	
	<div class="listing">
		<a href="#" class="card">
			<figure>
				<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/joshua-tree.jpg" />
			</figure>
			<div class="card-content">
				<h3 class="card-heading">Joshua Tree Overnight Adventure</h3>
				<p class="teaser">Aliquam gravida congue risus, ac sollicitudin risus dictum quis. Etiam urna libero, vehicula eget neque vel, congue blandit dui. Pellentesqu...</p>
				<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
			</div>
		</a>
		<a href="#" class="card">
			<figure class="video">
				<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/baker-beach.jpg" />
			</figure>
			<div class="card-content">
				<h3 class="card-heading">Stretch it out at sunset on Baker Beach</h3>
				<p class="teaser">Gather at Baker Beach before class to meet the founder of Outdoor Yoga SF, learn about the history of Baker Beach and why its important to Outdoor Yoga SF. </p>
				<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
			</div>
		</a>
		<a href="#" class="card">
			<figure>
				<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/fragile-future.jpg" />
			</figure>
			<div class="card-content">
				<h3 class="card-heading">Fragile Future, Private Commission Paris</h3>
				<p class="teaser">Aliquam gravida congue risus, ac sollicitudin risus dictum quis. Etiam urna libero, vehicula eget neque vel, congue blandit dui. Pellentesqu...</p>
				<div class="meta"><span class="category">Design</span> / <span class="date">August 21 2017</span></div>
			</div>
		</a>
	</div>
</section>

<div class="mid-page-slider">
	<div class="slide">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/mountain.jpg" />
		<div class="content">
			<h2><a href="#">World&rsquo;s Best Hikes:<br/> New Trails for a New Year</a></h2>
			<p class="teaser">Ready for a real New Year’s resolution? Why not commit to setting your feet on a brand-new long-distance hiking trail?</p>
			<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
		</div>
	</div>
	<div class="slide">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/mountain.jpg" />
		<div class="content">
			<h2><a href="#">World&rsquo;s Best Hikes:<br/> New Trails for a New Year</a></h2>
			<p class="teaser">Ready for a real New Year’s resolution? Why not commit to setting your feet on a brand-new long-distance hiking trail?</p>
			<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
		</div>
	</div>
	<div class="slide">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/mountain.jpg" />
		<div class="content">
			<h2><a href="#">World&rsquo;s Best Hikes:<br/> New Trails for a New Year</a></h2>
			<p class="teaser">Ready for a real New Year’s resolution? Why not commit to setting your feet on a brand-new long-distance hiking trail?</p>
			<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
		</div>
	</div>
	<div class="slide">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/mountain.jpg" />
		<div class="content">
			<h2><a href="#">World&rsquo;s Best Hikes:<br/> New Trails for a New Year</a></h2>
			<p class="teaser">Ready for a real New Year’s resolution? Why not commit to setting your feet on a brand-new long-distance hiking trail?</p>
			<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
		</div>
	</div>
	<div class="slide">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/mountain.jpg" />
		<div class="content">
			<h2><a href="#">World&rsquo;s Best Hikes:<br/> New Trails for a New Year</a></h2>
			<p class="teaser">Ready for a real New Year’s resolution? Why not commit to setting your feet on a brand-new long-distance hiking trail?</p>
			<div class="meta"><span class="category">Travel</span> / <span class="date">August 21 2017</span></div>
		</div>
	</div>
</div>

<section class="latest-reviews">
	<h2>Latest Reviews</h2>
</section>
            
          
!
            
              h2, h3, h4, p {
	margin:0;
}

a {
	color:currentColor;
	text-decoration:none;
}

figure {
	margin:0;
	padding:0;
}

h2, h3 {
	font-family: 'Montserrat', sans-serif;
	font-weight:400;
}

[role=banner] {
	margin:40px 0;
}

[role=banner] img {
	display:block;
	margin:0 auto;
}

.hero {
	margin-left:auto;
	margin-right: auto;
	max-width:1420px;
}

.hero img {
	display:block;
	height:100%;
	width:100%;
}

.slider {
	position:relative;
	width:100%;
}

.slider .slide {
	height:62.765vw;
	position:relative;
}
.mid-page-slider .slide {
	position:relative;
}

.slider .slick-dots {
	bottom:12%;
	list-style-type:none;
	margin:0;
	padding:0;
	position:absolute;
	right:21px;
}

.slider .slick-dots button {
	background:transparent;
	border:1px solid white;
	border-radius:50%;
	display:block;
	height:10px;
	margin-top:8px;
	padding:0;
	text-indent:-999em;
	width:10px;
}

.slider .slick-active button {
	background-color:white;j
}

.feature {
	position:relative;
	width:100%;
}

.feature img {
	object-fit: cover;
}

.hero .content,
.mid-page-slider .content {
	justify-content:flex-end;
	display:flex;
	flex-direction:column;
	position:absolute;
	top:0;
	bottom:12%;
	left:6.33%;
	right:0;
}

.hero h2,
.mid-page-slider h2 {
	color:white;
}

.slider h2,
.mid-page-slider h2 {
	font-size:21px;
	line-height:30px;
	margin-bottom:14px;
	max-width:21ch;
}

.feature h2 {
	font-size:14px;
	line-height:18px;
	margin-bottom:14px;
}

.slider .content h2 a {
	border-bottom:2px solid #F78181;
}

.meta {
	font-family: 'Open Sans', sans-serif;
	font-size:10px;
	letter-spacing:.075em;
	line-height:18px;
	text-transform:uppercase;
}

.hero .meta,
.mid-page-slider .meta {
	color:white;
}

.the-latest .meta {
	color:#9A9A9A;
}

.the-latest .category {
	color:#404040;
}

section {
	margin-top:100px;
}

section h2 {
	font-size:21px;
	padding:0 10px 20px;
	position:relative;
}

section h2::after {
	background:#F78181;
	content:'';
	height:2px;
	left:10px;
	position:absolute;
	bottom:0;
	width:4ch;
}

.the-latest .listing {
	background-color:#F7F7F7;
	padding:20px 10px 50px;
}

.the-latest .card {
	border-bottom:2px solid transparent;
	display:flex;
	flex-direction:column;
}

.the-latest .card:hover {
	border-bottom-color:#F78181;
}

.the-latest .card:not(:first-child) {
	margin-top:20px;
}

.the-latest .card-heading {
	font-size:16px;
	margin-bottom:12px;
}

.the-latest .teaser {
	color:#9A9A9A;
	font-size:13px;
	line-height:1.428;
	margin-bottom:12px;
}

.the-latest .card-content {
	background-color:white;
	padding:30px 20px 30px 20px;
}

.the-latest .card img {
	display:block;
	height:35vw;
	object-fit:cover;
	width:100%;
}

figure.video {
	position:relative;
}

figure.video::after {
	background:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/play.png') no-repeat;
	background-size:100%;
	content:'';
	display:block;
	height:92px;
	position:absolute;
	top:50%;
	left:50%;
	transform:translate(-50%, -50%);
	width:92px;
}

.mid-page-slider .slick-track {
	background-color:#F7F7F7;
}

.mid-page-slider .teaser {
	color:white;
	font-size:14px;
	font-family: 'Open Sans', serif;
	line-height:1.4825;
	margin-bottom:14px;
	max-width:50ch;
}

.mid-page-slider .slide img {
	display:block;
	height:100%;
	object-fit:cover;
	width:100%;
}

.mid-page-slider .slick-arrow {
	background:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/732/arrow-right.png') no-repeat;
	border:0;
	cursor:pointer;
	height:11px;
	outline:none;
	padding:0;
	position:absolute;
	text-indent:-999em;
	transition:width .25s ease-in;
	top:10px;
	width:18px;
	z-index:2;
}

.mid-page-slider .slick-prev {
	background-position:right center;
	transform:rotate(180deg);
	left:6.33%;
}

.mid-page-slider .slick-next {
	background-position:right center;
	right:6.33%;
}

.mid-page-slider .slick-prev:hover,
.mid-page-slider .slick-next:hover {
	width:32px;
}

.mid-page-slider .slick-dots {
	list-style-type:none;
	margin:10px 0 0;
	padding:0;
	text-align:center;
}

.mid-page-slider .slick-dots li {
	display:inline-block;
}

.mid-page-slider .slick-dots button {
	background-color:transparent;
	border:1px solid #9A9A9A;
	border-radius:50%;
	height:15px;
	margin:0 5px;
	padding:0;
	text-indent:-999em;
	width:15px;
}

.mid-page-slider .slick-dots .slick-active button {
	background-color:#9A9A9A;
}

@media (max-width:599px) {
	.feature {
		display:flex;
		flex-direction:row;
	}
	
	.feature:last-child {
		flex-direction:row-reverse;
	}
	
	.feature img {
		width:50%;
	}
	
	.feature .content {
		position:relative;
		left:0;
		bottom:0;
		padding:12px;
	}
	
	.feature .content h2,
	.feature .meta{
		color:black;
	}
}


@media (min-width:600px) {
	.hero {
		display:grid;
		grid-template-columns: repeat(2, 1fr);
		grid-gap:20px;
	}
	
	.slider {
		border-bottom:2px solid transparent;
		grid-column: 1 / span 2;
		grid-row: 1/ span 1;
		margin-bottom:0;
	}
	
	.slider h2,
	.mid-page-slider h2{
		font-size:36px;
		line-height:44px;
		margin:0 0 54px;
	}
	
	.feature {
		border-bottom:2px solid transparent;
		height:calc((62.765vw - 40px)/2);
	}
	
	.feature h2 {
		font-size:24px;
		line-height:29px;
		margin:0 0 21px;
		max-width:18ch;
	}
	
	.slider:hover,
	.feature:hover {
		border-color:#F78181;
	}
	
	.hero .meta,
	.mid-page-slider .meta {
		font-size:12px;
		letter-spacing:.075em;
		line-height:20px;
	}
	
	section h2 {
		font-size:36px;
	}
	
	.the-latest .listing {		
		display:grid;
		grid-template-columns: repeat(3, 1fr);
		grid-column-gap:40px;
		padding:50px 10px 100px;
	}
	
	.the-latest .card {
		background-color:white;
		position:relative;
	}
	
	.the-latest .card-content {
		display:flex;
		flex-direction:column;
		height:100%;
	}
	
	.the-latest .card:not(:first-child) {
		margin-top:0;
	}
	
	.the-latest .card img {
		height:auto;
	}
	
	.the-latest .card-heading {
		max-width:20ch;	
	}

	.the-latest .teaser {
		margin-bottom:56px;
		max-width:42ch;
	}
	
	.the-latest .card .meta {
		justify-content:flex-end;
		margin-top:auto;
	}
	
	.mid-page-slider .teaser {
		margin-bottom:82px;
	}
}

@media (min-width:600px) and (max-width:767px) {
	figure.video::after {
		height:56px;
		width:56px;
	}
}

@media (min-width:900px) {
	.the-latest .card-content {
		padding:35px 30px;
	}
	
	.the-latest .card-heading {
		font-size:24px;
		line-height:29px;
		margin-bottom:28px;
	}
	
	.the-latest .teaser {
		font-size:14px;
		margin-bottom:56px;
	}
	.the-latest .meta {
		font-size:12px;
		letter-spacing:.075em;
		line-height:20px;
	}
	.mid-page-slider .content {
		left:0;
		padding-left:19%;
		bottom:0;
		padding-bottom:14%;
	}
	
	.mid-page-slider .slick-arrow {
		bottom:8.14%;
		top:auto;
	}
	
	.mid-page-slider .slick-prev {
		left:6%;
	}
	
	.mid-page-slider .slick-next {
		right:6%;
	}
	
}

@media (min-width:940px) {
	.hero {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: repeat(2, 1fr);
		
	}
	
	.slider {
		grid-column: 1 / span 2;
		grid-row: 1/ 3;
	}
	
	.slider .slick-list,
	.slider .slick-track,
	.slider .slide {
		height:100%;
	}
	
	.feature {
		height:auto;
	}
}

@media (min-width:1060px) {
	.mid-page-slider {
		padding-left:calc(50% - 710px);
		width:1060px;
	}
	
	.mid-page-slider .slick-list {
		overflow:visible;
	}
	
	.mid-page-slider .slide {
		transition: opacity .25s ease-in;
	}
	
	.mid-page-slider .slide:not(.slick-current) {
		opacity:.3;
		transform:scale(.95);
		transform-origin: bottom center;
	}
	
	.mid-page-slider .slide:not(.slick-current) .content {
		opacity:0;
	}
}

@media (min-width:1420px) {
	section h2 {
		margin-left:auto;
		margin-right:auto;
		width:1400px;
	}
	.the-latest .listing {
		padding-left:calc(50% - 700px);
		padding-right:calc(50% - 700px);
	}
}
            
          
!
            
              $('.hero .slider').slick({
    slide:'.slide',
    infinite: true,
    slidesToShow:1,
    slidesToScroll:1,
    fade:true,
    autoplay:true,
    dots:true,
    arrows:false,
    speed:500,
    cssEase: 'linear',
    autoplaySpeed:5000
});

$('.mid-page-slider').slick({
    slide:'.slide',
    infinite: true,
    slidesToShow:1,
    slidesToScroll:1,
    fade:false,
    autoplay:true,
    dots:true,
    arrows:true,
    speed:500,
    cssEase: 'linear',
    autoplaySpeed:5000,
		mobileFirst: true,
		responsive : [
			{
				breakpoint: 1060,
				settings: {
					slidesToShow: 1,
					slidesToScroll: 1,
					dots: false
				}
			}
		]
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console