Team:HZAU-China/Team
From 2013.igem.org
(Difference between revisions)
Line 41: | Line 41: | ||
<style> | <style> | ||
*{margin:0px;padding:0px;} | *{margin:0px;padding:0px;} | ||
+ | .menu_scroll{z-index:100;padding:10px;margin:0 auto;top:20px;position:fixed;width:100%;margin:0;} | ||
ul.menu, | ul.menu, | ||
ul.menu ul {padding:0;margin:0;list-style:none;position:;width:200px;background:#ddd;font-family:arial, sans-serif;} | ul.menu ul {padding:0;margin:0;list-style:none;position:;width:200px;background:#ddd;font-family:arial, sans-serif;} | ||
Line 77: | Line 78: | ||
ul.menu input.close:checked ~ ul li {margin-top:-30px;} | ul.menu input.close:checked ~ ul li {margin-top:-30px;} | ||
</style> | </style> | ||
- | </ | + | <script type="text/javascript"> |
+ | $(document).ready(function(){ | ||
+ | var topMain=$("#sidebar").height()-0//是头部的高度加头部与nav导航之间的距离 | ||
+ | var menu=$(".menu"); | ||
+ | $(window).scroll(function(){ | ||
+ | if ($(window).scrollTop()>topMain){//如果滚动条顶部的距离大于topMain则就nav导航就添加类.nav_scroll,否则就移除 | ||
+ | menu.addClass("menu_scroll"); | ||
+ | }else{ | ||
+ | menu.removeClass("menu_scroll"); | ||
+ | } | ||
+ | }); | ||
+ | }) | ||
+ | </script> | ||
+ | |||
<body> | <body> | ||
<ul class="menu"> | <ul class="menu"> |
Revision as of 09:47, 24 July 2013
Members
Xiong Leintroduction |
|
Li Yunchuanintroduction |
|
Zhang Shaoweiintroduction |
|
Zhou Xianlinintroduction |
|
Bai Taointroduction |
|
Tan Xinintroduction |
|
Wu Weiintroduction |
|
Chen Jingintroduction |
|
Yang Mianintroduction |
|
Luo Xudongintroduction |
|
Tian Liuintroduction |
|
Ding Linfengintroduction |
|
Liu Changintroduction |
|
Zhang Peijingintroduction |
|
Hong Pingintroduction |
|
Yi Jianintroduction |
|
Instructors
Zhang Hongyuintroduction |
|
Ma Binguangintroduction |
|