Skip to content

Instantly share code, notes, and snippets.

@Cinemacloud
Created May 25, 2015 04:44
Show Gist options
  • Save Cinemacloud/34432ec1d11570811a00 to your computer and use it in GitHub Desktop.
Save Cinemacloud/34432ec1d11570811a00 to your computer and use it in GitHub Desktop.
paradise-edge
<div id="container" class="container">
<ul id="scene" class="scene">
<li class="layer" data-depth="0.05"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-01-01_cleaned.svg"></li>
<li class="layer" data-depth="0.10"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-11_cleaned.svg"></li>
<li class="layer" data-depth="0.10"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-10_cleaned.svg"></li>
<li class="layer" data-depth="0.10"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-09_cleaned.svg"></li>
<li class="layer" data-depth="0.05"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-04_cleaned.svg"></li>
<li class="layer" data-depth="0.05"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-03_cleaned.svg"></li>
<li class="layer" data-depth="0.05"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-02_cleaned.svg"></li>
<li class="layer" data-depth="0.15"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-06_cleaned.svg"></li>
<li class="layer" data-depth="0.15"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-05_cleaned.svg"></li>
<li class="layer" data-depth="0.15"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-08_cleaned.svg"></li>
<li class="layer" data-depth="0.15"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/73058/manHuntDown005-1-psd-07_cleaned.svg"></li>
</ul>
</div>
var scene = document.getElementById('scene');
var parallax = new Parallax(scene);
body {
font-family: monospace;
font-size: 18px;
background: #05040B;
color: #05040B;
margin: 0;
}
img {
display: block;
min-width: 100%;
}
.container {
position: relative;
max-width: 100%;
}
.scene {
padding: 40px;
margin: 0px;
}
.expand-width {
width: 100%;
}
.layer:nth-child(1) {
min-width: 100%;
min-height: 100%;
opacity: 0.90;
}
.layer:nth-child(2) {
min-width: 100%;
opacity: 0.8;
}
.layer:nth-child(3) {
min-width: 100%;
opacity: 1;
}
.layer:nth-child(4) {
min-width: 100%;
opacity: 1;
}
.layer:nth-child(5) {
min-width: 100%;
opacity: 0.80;
}
.layer:nth-child(6) {
min-width: 100%;
opacity: 0.80;
}
.layer:nth-child(7) {
min-width: 100%;
opacity: 0.80;
}
.layer:nth-child(8) {
min-width: 100%;
opacity: 1;
}
.layer:nth-child(9) {
min-width: 100%;
opacity: 1;
}
.layer:nth-child(10) {
min-width: 100%;
opacity: 1;
}
.layer:nth-child(11) {
min-width: 100%;
opacity: 1.0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment