Team:HZAU-China/Team
From 2013.igem.org
(Difference between revisions)
Line 11: | Line 11: | ||
} | } | ||
#sidebar { | #sidebar { | ||
- | |||
background-color:transparent; | background-color:transparent; | ||
clear: both; | clear: both; | ||
Line 19: | Line 18: | ||
margin-bottom: 5px; | margin-bottom: 5px; | ||
padding-top: 5px; | padding-top: 5px; | ||
+ | padding-left: 10px; | ||
+ | } | ||
} | } | ||
#paragraphs { | #paragraphs { | ||
Line 41: | Line 42: | ||
<style> | <style> | ||
*{margin:0px;padding:0px;} | *{margin:0px;padding:0px;} | ||
+ | .menu_scroll{z-index:100;padding:10px;margin:0 auto;top:0px;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- | ul.menu ul {padding:0;margin:0;list-style:none;position:;width:200px;background:#ddd;font- | ||
- | |||
family:arial, sans-serif;} | family:arial, sans-serif;} | ||
ul.menu {z-index:100;padding:10px;margin:0 auto;} | ul.menu {z-index:100;padding:10px;margin:0 auto;} | ||
Line 89: | Line 90: | ||
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()-300//是头部的高度加头部与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:35, 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 |
|