Team:XMU-China/Team Members
From 2014.igem.org
(Difference between revisions)
Fengshao18 (Talk | contribs) |
|||
Line 628: | Line 628: | ||
<!--回到顶页的小图标--> | <!--回到顶页的小图标--> | ||
- | <div id="gototop" style="width:60px; top: | + | <div id="gototop" style="width:60px; top:550px; right:75px; cursor:pointer; position:fixed;"> |
- | <img src="https://static.igem.org/mediawiki/2014/ | + | <img src="https://static.igem.org/mediawiki/2014/b/bd/Xmu_stop_UFO.png" width="150%" height="150%"/> |
+ | </div> | ||
+ | <div id="gototop_2" style="width:60px; top:550px; right:75px; cursor:pointer; position:fixed;"> | ||
+ | <img src="https://static.igem.org/mediawiki/2014/a/ae/Xmu_up_UFO_zwei.png" width="150%" height="150%"/> | ||
+ | </div> | ||
+ | <div id="gototop_3" style="width:60px; top:550px; right:75px; cursor:pointer; position:fixed;"> | ||
+ | <img src="https://static.igem.org/mediawiki/2014/a/a2/Xmu_down_UFO_zwei.png" width="150%" height="150%"/> | ||
</div> | </div> | ||
- | + | ||
- | + | <!--图标随滚动变化--> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | $("#gototop_2").hide(); | |
- | + | $("#gototop_3").hide(); | |
- | + | lastScrollY = 0; | |
- | + | $(window).scroll(function(){ | |
- | + | var diffY =$(window).scrollTop(); | |
- | + | percent=diffY-lastScrollY; //获取滚动的百分比 | |
- | else {$("#gototop"). | + | if(percent>0) { |
+ | $("#gototop").hide(); | ||
+ | $("#gototop_2").hide(); | ||
+ | $("#gototop_3").show(); | ||
+ | } | ||
+ | else { | ||
+ | $("#gototop").hide(); | ||
+ | $("#gototop_3").hide(); | ||
+ | $("#gototop_2").show(); | ||
+ | } | ||
+ | lastScrollY = diffY; | ||
+ | $("#gototop").animate({padding: "+=0px"},1000,function(){ | ||
+ | $("#gototop_3").hide(); | ||
+ | $("#gototop_2").hide(); | ||
+ | $("#gototop").show(); | ||
}); | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <!--图标回到顶页--> | ||
+ | <script type="text/javascript"> | ||
$("#gototop").click(function(){ | $("#gototop").click(function(){ | ||
$('body,html').animate({scrollTop:0},500); | $('body,html').animate({scrollTop:0},500); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
}); | }); | ||
- | |||
- | |||
</script> | </script> | ||
- | <script type="text/javascript" | + | |
+ | |||
+ | <!--侧边栏自动显示和隐藏的功能--> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | |||
+ | $("#side_bar").hide(); | ||
+ | |||
+ | $(window).scroll(function(){ | ||
+ | if ($(window).scrollTop()>500) {$("#side_bar").fadeIn();} | ||
+ | else {$("#side_bar").fadeOut();} | ||
+ | }); | ||
+ | |||
+ | }); | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 13:40, 16 October 2014
Try to click on me in the Picture !
Jianxing Huang
sdadsaddsdsadada
ddsdasdsadasdsdadadsdadsdsdadeqwesdsadasd
wesadaaa
czxcsdseqwedasdad
weqwdsafadaeqwesdasdadsaddsdsadadaddsdasdsadasdsdadadsdadsdsdadeqwesdsadasdwesadaa
aczxcsdseqwedasdadweqwdsafadaeqwesda
Xifeng Guo
daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeewwwwwwwwwwwwwww
dsadasddaddwwqeqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
dadwewqweadasdasdasdasdsdewqeqeqeqwe
Chun Tang
daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeewwwwwwwwwwwwwww
dsadasddaddwwqeqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
dadwewqweadasdasdasdasdsdewqeqeqeqwe