Skip to content

Instantly share code, notes, and snippets.

@owngeek
Created September 21, 2016 06:06
Show Gist options
  • Save owngeek/272ca7c229ac9b17e23f55cf4ffb6a22 to your computer and use it in GitHub Desktop.
Save owngeek/272ca7c229ac9b17e23f55cf4ffb6a22 to your computer and use it in GitHub Desktop.
Parallax Scrolling
<style>
body, html {
height: 100%;
margin: 0;
font: 400 15px/1.8 "Lato", sans-serif;
color: #fff;
}
.bg_img-1, .bg_img-2, .bg_img-3 {
position: relative;
opacity: 0.65;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.bg_img-1 {
background-image: url("https://4.bp.blogspot.com/-XwOZSclEXxY/V06vN7CA0CI/AAAAAAAAAcs/F6R-a9PbXp4rmlGoH7IsyZPANaB8lWoygCK4B/s1600/website-design-iin-coimbatore.jpg");
min-height: 100%;
}
.bg_img-2 {
background-image: url("https://3.bp.blogspot.com/-lJ0LTS_RqT0/V0aFU0TDkUI/AAAAAAAAAcQ/kt8d5dZnFnAOidp4JWvCwIE7hgU0uwCgACK4B/s1600/geek%2Btimeline2.png");
min-height: 400px;
}
.title {
position: absolute;
left: 0;
top: 50%;
width: 100%;
text-align: center;
color: #000;
}
.title span.border {
background-color: #9C27B0;
color: #fff;
padding: 18px;
font-size: 25px;
letter-spacing: 10px;
}
h3 {
letter-spacing: 5px;
text-transform: uppercase;
font: 20px "Lato", sans-serif;
color: #fff;
}
</style>
<div class="bg_img-1">
<div class="title">
<span class="border">SCROLL DOWN</span>
</div>
</div>
<div style="color: #777;background-color:#9C27B0;text-align:center;padding:50px 80px;text-align: justify;">
<h3 style="text-align:center;">Title</h3>
<p style="color:#fff">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="bg_img-2">
<div class="title">
<span class="border" style="background-color:transparent;font-size:25px;color: #f7f7f7;">Title</span>
</div>
</div>
<div style="position:relative;">
<div style="color:#ddd;background-color:#000;text-align:center;padding:50px 80px;text-align: justify;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment