Team:Cornell/sandbox

From 2013.igem.org

(Difference between revisions)
Line 314: Line 314:
Parallax
Parallax
----------------------------------------- */
----------------------------------------- */
-
.section {      
+
.parallax-wrapper {
position: absolute;
position: absolute;
-
}
 
-
.section .inner {
 
-
z-index: 2;
 
-
position: fixed;
 
-
}
 
-
 
-
.constant {
 
-
height: 100px;
 
}
}
</style>
</style>
Line 333: Line 325:
function parallaxScroll(){
function parallaxScroll(){
var scrolled = $(window).scrollTop();
var scrolled = $(window).scrollTop();
-
$('.section').css('top',(0-(scrolled*.25))+'px');
+
$('#foreground').css('right',(0+(scrolled*.75))+'px');
-
$('.inner').css('top',(0-(scrolled*.5))+'px');
+
$('#midground').css('right',(0+(scrolled*.5))+'px');
 +
$('#background').css('right',(0+(scrolled*.25))+'px');
}
}
</script>
</script>
Line 340: Line 333:
<body>
<body>
-
<div class="content">
+
<!-- navigation -->
-
<h1> Whee </h1>
+
-
<div class="section">
+
-
<div class="inner">
+
-
Texty text
+
-
+
-
</div>
+
-
</div>
+
-
</div>
+
<div id="navbar">
<div id="navbar">
<img class="left" src ="https://static.igem.org/mediawiki/igem.org/6/67/IGEMsmall.png" style="margin-top: -32px; margin-right: 35px;">
<img class="left" src ="https://static.igem.org/mediawiki/igem.org/6/67/IGEMsmall.png" style="margin-top: -32px; margin-right: 35px;">
Line 359: Line 344:
<li class="right"> Facebook </li>
<li class="right"> Facebook </li>
</ul>
</ul>
 +
</div>
 +
<header>
 +
<h1> Whee </h1>
 +
</header>
 +
<div class="parallax-wrapper">
 +
<!-- content -->
 +
<div class="content">
 +
<div id="project">
 +
<header>
 +
<h2> Project </h2>
 +
</header>
 +
<div> We did stuff </div>
 +
</div>
 +
<div id="team">
 +
<header>
 +
<h2> Notebook </h2>
 +
<div> We wrote about stuff </div>
 +
</div>
 +
 +
<!-- foreground -->
 +
<div id="foreground">
 +
<img id="bg-project" src="https://static.igem.org/mediawiki/2013/f/f7/Cornell_IMG_4699.jpg" alt="pipetting glove">
 +
<img id="bg1-team" src="https://static.igem.org/mediawiki/2013/0/07/Luengvarinkul_oat.jpg" alt="Oat">
 +
</div>
 +
 +
<!-- midground -->
 +
<div id="midground">
 +
<img id="mid1" src="http://f6design.com/projects/parallax-scrolling/img/cloud-lg1.png" alt="Big cloud">
 +
<img id="mid2" src="http://f6design.com/projects/parallax-scrolling/img/cloud-lg1.png" alt="Big cloud">
 +
<img id="mid3" src="http://f6design.com/projects/parallax-scrolling/img/cloud-lg1.png" alt="Big cloud">
 +
<img id="mid4" src="http://f6design.com/projects/parallax-scrolling/img/cloud-lg1.png" alt="Big cloud">
 +
</div>
 +
 +
<!-- background -->
 +
<div id="background">
 +
<img id="back1" src="http://s8210.storage.proboards.com/5498210/i/XsOgTFwPEcw6_rDCXT56.jpg" alt="Eric's favorite fish">
 +
<img id="back2" src="http://s8210.storage.proboards.com/5498210/i/XsOgTFwPEcw6_rDCXT56.jpg" alt="Eric's favorite fish">
 +
</div>
 +
</div>
</div>
</div>
</body>
</body>
</html>
</html>

Revision as of 19:08, 26 December 2013

Parallax Test

Whee

Project

We did stuff

Notebook

We wrote about stuff
pipetting glove Oat
Big cloud Big cloud Big cloud Big cloud
Eric's favorite fish Eric's favorite fish