Skip to content

Instantly share code, notes, and snippets.

@awakekat
Last active August 27, 2016 16:51
Show Gist options
  • Save awakekat/c0e7fe10d9c635fc1e31bcae0a6ee563 to your computer and use it in GitHub Desktop.
Save awakekat/c0e7fe10d9c635fc1e31bcae0a6ee563 to your computer and use it in GitHub Desktop.
.parallax-background {
background-color: #0078A0;
height: 620px;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
position: fixed;
width: 100%;
}
.intro-text {
font-size: 50px;
color: #fff;
text-align: center;
margin-top: 15%;
}
.parallax-content {
max-width: 100%;
position: relative;
top: 500px;
padding: 50px;
font-size: 20px;
background-color: #fff;
}
<div class="parallax-background">
<div class="intro-text">
scroll for parallax!
<p><i class="fa fa-arrow-right"></i></p>
</div>
</div>
<div class="parallax-content">
<p>Curabitur blandit tempus porttitor. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment