JSFiddle - React, Tailwind, and code Playground
by tightman
HTML
<meta name="viewport" content="width=device-width" />
<!--<link rel="stylesheet" type="text/css" href="http://hannemann-media.ch/clients/lukaspasi_wp/wp-content/themes/lukaspasi/style.css">-->
<script src="http://hannemann-media.ch/clients/lukaspasi_wp/wp-content/themes/lukaspasi/js/jquery-1.8.2.js"></script>
<script src="http://hannemann-media.ch/clients/lukaspasi_wp/wp-content/themes/lukaspasi/js/jquery.stellar.js"></script>
<script src="http://hannemann-media.ch/clients/lukaspasi_wp/wp-content/themes/lukaspasi/js/start.stellar.js"></script>
<script src="http://hannemann-media.ch/clients/lukaspasi_wp/wp-content/themes/lukaspasi/js/iscroll.js"></script>
<body>
<div id="wrapper">
<div id="scroller">
<div class="nav"></div>
<img src="http://www.mobilegeeks.de/wp-content/uploads/2013/04/Google-Logo.jpg" alt="" height="50" width="100"/>
<div id="">
<h1>Stellar.js</h1>
<h2>Mobile Parallax Demo</h2>
<p>Scroll down to see Stellar.js in action.</p>
<section>
<div class="pixel" data-stellar-ratio="1.1"></div>
<div class="pixel" data-stellar-ratio="1.2"></div>
<div class="pixel" data-stellar-ratio="1.3"></div>
<div class="pixel" data-stellar-ratio="1.4"></div>
<div class="pixel" data-stellar-ratio="1.5"></div>
<div class="pixel" data-stellar-ratio="1.6"></div>
<div class="pixel" data-stellar-ratio="1.7"></div>
<div class="pixel" data-stellar-ratio="1.8"></div>
<div class="pixel" data-stellar-ratio="1.9"></div>
<div class="pixel" data-stellar-ratio="2.0"></div>
</section>
</div>
</div>
</div>
</body>
CSS
* {
margin: 0;
padding: 0;
}
body {
background: #2491F7 !important;
}
img {
position: relative;
}
.nav {
width: 100%;
height: 50px;
background: black;
position: absolute;
}
section {
position: relative;
top: 400px;
width: 300px;
height: 3000px;
margin: 0 auto;
}
h1, h2, p {
color: white;
font-family: helvetica, arial;
text-shadow: 0 1px 2px rgba(0,0,0,0.5);
position: absolute;
left: 50%;
width: 300px;
margin-left: -150px;
}
h1 {
font-size: 68px;
top: 85px;
}
h2 {
font-size: 27px;
top: 170px;
}
p {
font-size: 17px;
top: 210px;
}
.pixel {
position: absolute;
width: 15px;
height: 15px;
border-radius: 15px;
background: white;
}
.pixel:nth-child(2) { left: 30px; }
.pixel:nth-child(3) { left: 60px; }
.pixel:nth-child(4) { left: 90px; }
.pixel:nth-child(5) { left: 120px; }
.pixel:nth-child(6) { left: 150px; }
.pixel:nth-child(7) { left: 180px; }
.pixel:nth-child(8) { left: 210px; }
.pixel:nth-child(9) { left: 240px; }
.pixel:nth-child(10) { left: 270px; }
.mobile body {
overflow: hidden;
}
.mobile #wrapper {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
}
.mobile #scroller {
height: 3000px;
}