Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sequence.js - Basic Parallax Theme
<div id="sequence" class="seq">
<div class="seq-bg"></div>
<div class="seq-screen">
<ul class="seq-canvas">
<li class="seq-in seq-valign">
<div class="seq-content">
<h2 data-seq class="seq-title">Powered by Sequence.js</h2>
<div data-seq class="seq-description">
<p>The responsive CSS animation framework</p>
<a class="seq-button" href="http://sequencejs.com/" target="_blank">Learn more <span class="seq-next-arrow">&gt;</span></a>
</div>
</div>
</li>
<li class="seq-valign">
<div class="seq-content">
<h2 data-seq class="seq-title">Create Unique Animated Themes</h2>
<div data-seq class="seq-description">
<p>For sliders, presentations, <br />banners, and other step-based applications</p>
<a class="seq-button" href="http://sequencejs.com/" target="_blank">Learn more <span class="seq-next-arrow">&gt;</span></a>
</div>
</div>
</li>
<li class="seq-valign">
<div class="seq-content">
<h2 data-seq class="seq-title">Rapid Development of Step-Based Applications</h2>
<div data-seq class="seq-description">
<p>All of the JavaScript functionality you need built-in</p>
<a class="seq-button" href="http://sequencejs.com/" target="_blank">Learn more <span class="seq-next-arrow">&gt;</span></a>
</div>
</div>
</li>
</ul>
</div>
<fieldset class="seq-nav" aria-controls="sequence" aria-label="Slider buttons">
<button type="button" class="seq-prev" aria-label="Previous">
<span class="seq-prev-arrow">&lt;</span>
</button>
<ul role="navigation" aria-label="Pagination" class="seq-pagination">
<li><a href="#step1" rel="step1" title="Go to slide 1">1</a></li>
<li><a href="#step2" rel="step2" title="Go to slide 2">2</a></li>
<li><a href="#step3" rel="step3" title="Go to slide 3">3</a></li>
</ul>
<button type="button" class="seq-next" aria-label="Next">
<span class="seq-next-arrow">&gt;</span>
</button>
</fieldset>
</div>
<small><a href="http://subtlepatterns.com/dark-sharp-edges/" target="_blank">Dark Sharp Edges</a> background pattern by <a href="https://lodyas.com/carlos-aguilar/" target="_blank">Carlos Aguilar</a> made available on <a href="http://subtlepatterns.com" target="_blank">Subtle Patterns</a></small>
[[[http://codepen.io/IanLunn/pen/ac8ba50b4e41bcea2afc3f46bc46b4e6]]]
// Get the Sequence element
var sequenceElement = document.getElementById("sequence");
// See: http://sequencejs.com/documentation/#options
var options = {
animateCanvas: false,
phaseThreshold: false,
preloader: true,
fadeStepWhenSkipped: true,
reverseWhenNavigatingBackwards: true
}
var mySequence = sequence(sequenceElement, options);
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/154/imagesloaded.pkgd.min.js"></script>
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/154/hammer.min.js"></script>
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/154/sequence.min.2.1.0.js"></script>

Sequence.js - Basic Parallax Theme

A basic parallax theme made with Sequence.js.

Sequence.js is a responsive CSS animation framework for creating unique sliders, presentations, banners, and other step-based applications.

Using the classes "seq-in" and "seq-out", you can control the transitions of each step as it becomes active.

Sequence.js supports responsive design. Check this demo out at various widths to see the layout change.

Find out more at sequencejs.com and check out other cool themes.

A Pen by Ian Lunn on CodePen.

License.

@import url(http://fonts.googleapis.com/css?family=Droid+Sans:400,700|Cabin);
body {
margin: 0;
padding: 0;
}
small {
/* Theme Credits */
display: block;
margin: 1em;
font-family: sans-serif;
}
.seq {
position: relative;
height: 400px;
width: 100%;
max-width: 100%;
overflow: hidden;
margin: 0 auto;
padding: 0;
font-family: 'Droid Sans', sans-serif;
-webkit-text-size-adjust: 100%;
color: white;
background: #e4e4e4;
}
.seq button {
cursor: pointer;
margin: 0;
border: none;
background-color: transparent;
}
.seq .seq-screen,
.seq .seq-canvas,
.seq .seq-canvas > * {
position: absolute;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
list-style: none;
}
.seq .seq-screen {
height: auto !important;
top: 0;
bottom: 3em;
}
.seq .seq-valign {
font-size: 0;
}
.seq .seq-valign:before,
.seq .seq-valign > * {
display: inline-block;
vertical-align: middle;
}
.seq .seq-valign > * {
font-size: 16px;
}
.seq .seq-valign:before {
content: "";
height: 100%;
}
.seq .seq-preloader {
background: #e4e4e4;
}
.seq .seq-preload-circle {
fill: #006E94;
}
.seq .seq-content {
width: 100%;
text-align: center;
}
.seq .seq-bg {
position: absolute;
top: 0;
bottom: 0;
width: 200%;
height: 100%;
background: url("https://raw.githubusercontent.com/SequenceJS/parallax-basic/581c100405482a7212b476d08b184c11ac0b204e/images/footer_lodyas-blue.png") repeat;
transition-duration: 1s;
transition-property: transform;
}
.seq .seq-nav {
position: absolute;
z-index: 10;
bottom: 1em;
height: 2em;
padding: 0;
width: 100%;
border: none;
text-align: center;
color: white;
}
.seq .seq-nav > *,
.seq .seq-nav li {
list-style: none;
display: inline-block;
vertical-align: middle;
}
.seq .seq-pagination {
height: 100%;
margin: 0;
padding: 0;
}
.seq .seq-pagination a {
display: block;
height: 100%;
padding: 0 .75em;
line-height: 2;
text-decoration: none;
color: white;
transition-duration: .3s;
transition-property: background-color, color;
}
.seq .seq-pagination .seq-current a {
background: white;
color: black;
}
.seq .seq-pagination > *,
.seq .seq-prev,
.seq .seq-next {
margin: 0 .375em;
height: 100%;
background-color: rgba(255, 255, 255, 0.2);
color: white;
font-size: 1em;
font-family: 'Droid Sans', sans-serif;
transition-duration: .3s;
transition-property: background-color, color;
}
.seq .seq-pagination > *:hover,
.seq .seq-pagination > *:hover a,
.seq .seq-prev:hover,
.seq .seq-prev:hover a,
.seq .seq-next:hover,
.seq .seq-next:hover a {
background-color: white;
color: black;
}
.seq .seq-prev {
margin-left: 0;
text-align: left;
}
.seq .seq-next {
margin-right: 0;
text-align: right;
}
.seq .seq-prev-arrow,
.seq .seq-next-arrow {
position: relative;
padding: 0 .5em;
top: -1px;
font-family: 'Cabin', sans-serif;
-moz-osx-font-smoothing: grayscale;
}
.seq .seq-button {
display: inline-block;
margin: 0 auto;
margin-top: 1em;
padding: .875em 1em;
border-top: white solid 1px;
color: white;
font-family: 'Droid Sans', sans-serif;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
}
.seq .seq-button .seq-next-arrow {
display: inline-block;
transition-duration: .2s;
transition-property: transform;
}
.seq .seq-button:hover .seq-next-arrow {
transform: translateX(6px);
}
.seq .seq-title {
font-size: 1.6em;
margin: .4em 0;
padding: 0 15%;
text-transform: uppercase;
line-height: 1.3;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25);
}
.seq p {
margin-bottom: .75em;
padding: 0 1em;
font-size: 1.06666667em;
font-family: 'Cabin', sans-serif;
font-weight: 400;
text-transform: none;
text-shadow: none;
line-height: 140%;
}
.seq .seq-description {
font-size: .9375em;
}
.seq .seq-title,
.seq .seq-description {
display: block;
transform: translateX(100%) translateZ(0);
transition-duration: .5s;
}
.seq .seq-in .seq-title {
transform: translateX(0) translateZ(0);
transition-delay: .1s;
}
.seq .seq-in .seq-description {
transform: translateX(0) translateZ(0);
transition-delay: .2s;
}
.seq .seq-out .seq-title,
.seq .seq-out .seq-description {
transform: translateX(-100%) translateZ(0);
}
.seq.seq-step2 .seq-bg {
transform: translateX(-5%) translateZ(0);
}
.seq.seq-step3 .seq-bg {
transform: translateX(-10%) translateZ(0);
}
@media only screen and (min-width: 375px) {
.seq .seq-title {
font-size: 2em;
}
.seq p {
font-size: 1.2em;
}
}
@media only screen and (min-width: 480px) {
.seq .seq-title {
font-size: 2.375em;
}
.seq p {
font-size: 1.4em;
}
}
@media only screen and (min-width: 640px) {
.seq {
position: relative;
height: auto;
height: 100%;
max-height: 90vh;
min-height: 400px;
}
.seq:before {
display: block;
content: "";
width: 100%;
padding-top: 56.25%;
}
.seq .seq-screen {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}
@media only screen and (min-width: 768px) {
.seq p {
padding: 0 8em;
}
}
@media only screen and (min-width: 1024px) {
.seq .seq-title {
font-size: 3em;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.2), 0 20px 20px rgba(0, 0, 0, 0.15);
}
.seq p {
font-size: 1.6em;
padding: 0 4em;
}
.seq .seq-button {
font-size: 1.2em;
}
}
@media only screen and (min-width: 1600px) {
.seq .seq-title {
font-size: 4em;
}
.seq p {
font-size: 2em;
}
}
<link href="http://codepen.io/IanLunn/pen/ac8ba50b4e41bcea2afc3f46bc46b4e6" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment