(Prototype team page) |
|||
Line 1: | Line 1: | ||
− | |||
<html> | <html> | ||
+ | <head> | ||
+ | <style type="text/css"> | ||
+ | <!-- | ||
+ | body{ | ||
+ | background-image: url("https://2017.igem.org/File:Bg1.jpeg"); | ||
+ | background-repeat: no-repeat; | ||
+ | background-position: center center; | ||
+ | background-size: cover; | ||
+ | background-attachment: fixed; | ||
+ | } | ||
+ | #content{ | ||
+ | background-image: url("https://2017.igem.org/File:Bg1.jpeg"); | ||
+ | background-repeat: no-repeat; | ||
+ | background-position: center center; | ||
+ | background-size: cover; | ||
+ | background-attachment: fixed; | ||
+ | } | ||
+ | #floating { | ||
+ | bottom: 20px; | ||
+ | right: 20px; | ||
+ | position: fixed; | ||
+ | z-index: 5; | ||
+ | } | ||
+ | #floating img{ | ||
+ | width: 80px; | ||
+ | height: 80px; | ||
+ | } | ||
+ | --></style> | ||
+ | </head> | ||
+ | <body> | ||
+ | <script> | ||
+ | /**** Scroll Link ****/ | ||
+ | |||
+ | $(function(){ | ||
+ | $('.scroll_link').on('click', function(event){ | ||
+ | event.preventDefault(); | ||
+ | |||
+ | var $this = $(this); | ||
+ | var linkTo = $this.attr('href'); | ||
+ | var $target = $(linkTo); | ||
+ | var pos = $target.offset().top; | ||
+ | $('html,body').animate({scrollTop: pos}, 400); | ||
+ | }); | ||
+ | }); | ||
− | + | $(function(){ | |
− | + | $('.scroll_link').hide(); | |
− | + | $(window).scroll(function () { | |
− | + | if($(window).scrollTop() > 0) { | |
− | + | $('.scroll_link').slideDown(600); | |
− | + | } else { | |
− | + | $('.scroll_link').slideUp(600); | |
− | + | } | |
− | + | }); | |
− | + | }); | |
− | + | </script> | |
− | + | </body> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</html> | </html> |
Revision as of 00:29, 19 June 2017