<div class="splash-container">
<div class="splash">
<h1 class="splash-head">Pure CSS Parallax</h1>
<p class="splash-subhead">
Scroll-over effect from the Pure framework
</p>
<p>
<a href="https://purecss.io" target="_blank">See More</a>
</p>
</div>
</div>
<div class="content-wrapper">
<div class="content">
</div>
</div>
* {
font-family: Helvetica, sans-serif;
}
a {
text-decoration: none;
color: #fff;
background: #1abc9c;
padding: 10px;
border-radius: 3px;
}
.splash-container {
background: #1f8dd6;
z-index: -1;
overflow: hidden;
/* The following styles are required for the "scroll-over" effect */
width: 100%;
height: 88%;
top: 0;
left: 0;
position: fixed !important;
}
.splash {
/* absolute center .splash within .splash-container */
width: 80%;
height: 50%;
margin: auto;
position: absolute;
top: 100px; left: 0; bottom: 0; right: 0;
text-align: center;
text-transform: uppercase;
}
/* This is the main heading that appears on the blue section */
.splash-head {
font-size: 20px;
font-weight: bold;
color: white;
border: 3px solid white;
padding: 1em 1.6em;
font-weight: 100;
border-radius: 5px;
line-height: 1em;
}
/* This is the subheading that appears on the blue section */
.splash-subhead {
color: white;
letter-spacing: 0.05em;
opacity: 0.8;
padding: 10px;
}
.content-wrapper {
/* These styles are required for the "scroll-over" effect */
position: absolute;
top: 87%;
width: 100%;
min-height: 12%;
z-index: 2;
background: white;
}
/* This is the class used for the main content headers (<h2>) */
.content-head {
font-weight: 400;
text-transform: uppercase;
letter-spacing: 0.1em;
margin: 2em 0 1em;
}
.content {
height: 1000px;
}
// Fixed background with low z-index for scroll over effect
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.