Team:HZAU-China/Meeting Record

From 2013.igem.org

(Difference between revisions)
Line 76: Line 76:
ul.menu input.close:checked ~ ul li {margin-top:-30px;}
ul.menu input.close:checked ~ ul li {margin-top:-30px;}
</style>
</style>
-
 
-
<script>
 
-
$(document).ready(function(){
 
-
var topMain=$("#sidebar").height()+100//是头部的高度加头部与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>

Revision as of 08:10, 27 September 2013