Team:Cornell/sandbox
From 2013.igem.org
(Difference between revisions)
Line 193: | Line 193: | ||
} | } | ||
- | div. | + | div.wrapper { |
margin: 0 204px; | margin: 0 204px; | ||
} | } | ||
Line 285: | Line 285: | ||
.hide { display: none; } | .hide { display: none; } | ||
.highlight { background: #ffff99; } | .highlight { background: #ffff99; } | ||
+ | .absolute { position: absolute; } | ||
#googlemap img, object, embed { max-width: none; } | #googlemap img, object, embed { max-width: none; } | ||
Line 314: | Line 315: | ||
Parallax | Parallax | ||
----------------------------------------- */ | ----------------------------------------- */ | ||
- | .parallax { | + | .parallax { position: absolute; left: 50% }; |
- | + | .layer1 { z-index: 4; } | |
- | } | + | .layer2 { z-index: 3; } |
- | . | + | .layer3 { z-index: 2; } |
- | + | .layer4 { z-index: 1; } | |
- | } | + | |
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
</style> | </style> | ||
Line 336: | Line 330: | ||
function parallaxScroll(){ | function parallaxScroll(){ | ||
var scrolled = $(window).scrollTop(); | var scrolled = $(window).scrollTop(); | ||
- | $(' | + | $('.parallax').css('left', scrolled / $(this).data('speed')+'px'); |
- | + | ||
- | + | ||
} | } | ||
</script> | </script> | ||
Line 356: | Line 348: | ||
</ul> | </ul> | ||
</div> | </div> | ||
+ | |||
<!-- content --> | <!-- content --> | ||
- | <div class=" | + | <div class="wrapper"> |
<header> | <header> | ||
<h1> Whee </h1> | <h1> Whee </h1> | ||
</header> | </header> | ||
- | <div class="parallax"> | + | <!-- Screen 1 --> |
- | + | <div class="parallax" data-speed="5"> | |
- | + | <h2> Project </h2> | |
- | + | ||
- | + | ||
</div> | </div> | ||
- | <div class="parallax | + | <div class="parallax" data-speed="10"> |
- | + | <img src="https://static.igem.org/mediawiki/igem.org/6/67/IGEMsmall.png"> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | <img | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</div> | </div> | ||
+ | |||
</div> | </div> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 19:49, 26 December 2013