Difference between revisions of "Team:Kent/Team"
Jamesaston (Talk | contribs) |
Jamesaston (Talk | contribs) |
||
Line 4: | Line 4: | ||
<html> | <html> | ||
− | <div class="banner-image-overlay"> | + | <div class="banner-image-overlay parallax"> |
<div style="opacity:1"><img src="https://static.igem.org/mediawiki/2015/4/41/Team_Kent_TeamPhoto.jpg" alt="" class="banner-image-logo"/></div> | <div style="opacity:1"><img src="https://static.igem.org/mediawiki/2015/4/41/Team_Kent_TeamPhoto.jpg" alt="" class="banner-image-logo"/></div> | ||
</div> | </div> | ||
Line 10: | Line 10: | ||
</div> | </div> | ||
+ | <script defer="defer" type="text/javascript"> | ||
+ | |||
+ | // Parallax | ||
+ | (function(){ | ||
+ | var parallax = document.querySelectorAll(".parallax"), | ||
+ | speed = 0.5; | ||
+ | window.onscroll = function(){ | ||
+ | [].slice.call(parallax).forEach(function(el,i){ | ||
+ | var windowYOffset = window.pageYOffset, | ||
+ | elBackgrounPos = "50% " + (windowYOffset * speed) + "px"; | ||
+ | el.style.backgroundPosition = elBackgrounPos; | ||
+ | }); | ||
+ | }; | ||
+ | |||
+ | })(); | ||
+ | $('a[href="#content-container"]').click(function(){ | ||
+ | var the_id = $(this).attr("href"); | ||
+ | $('html, body').animate({ | ||
+ | scrollTop:$(the_id).offset().top-30 | ||
+ | }, 'slow'); | ||
+ | return false; | ||
+ | }); | ||
+ | </script> | ||
</html> | </html> | ||
{{KentFooter}} | {{KentFooter}} |
Revision as of 23:21, 27 June 2015