Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
<!DOCTYPE html>
<title>Scroll Snap &amp; Backdrop Filter</title>
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
body {
margin: 0;
padding-top: 10vh;
font: 5em 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 100;
text-align: center;
color: white;
-webkit-scroll-snap-type: mandatory;
scroll-snap-type: mandatory;
-webkit-scroll-snap-destination: 50% 55%;
scroll-snap-destination: 50% 55%;
h1 {
margin: 0;
height: 10vh;
line-height: 10vh;
position: fixed;
left: 0;
top: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
font-size: 0.33em;
font-weight: inherit;
-webkit-backdrop-filter: blur(2px);
backdrop-filter: blur(2px);
.slide {
height: 90vh;
line-height: 90vh;
background-image: url(;
-webkit-scroll-snap-coordinate: 50% 50%;
scroll-snap-coordinate: 50% 50%;
.slide:nth-of-type(1) { background-color: tomato }
.slide:nth-of-type(2) { background-color: cadetblue }
.slide:nth-of-type(3) { background-color: plum }
.slide:nth-of-type(4) { background-color: cornflowerblue }
<h1>Scroll Snap &amp; Backdrop Filter</h1>
<div class='slide'>Slide 1</div>
<div class='slide'>Slide 2</div>
<div class='slide'>Slide 3</div>
<div class='slide'>Slide 4</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment