JS滚动到指定位置导航栏固定顶部
最近整理一下之前做的一个项目,把滚动条动态固定顶部的代码整理出来和大家分享,上代码
js滚动到指定位置导航栏固定顶部 body{height:2500px;margin:0;padding:0;} .banner{height:250px;width:100%;background:#e5e5e5;} .bignav{width:100%;background:#000;} .nav{background:#000;width:1200px;margin:0auto;height:45px;} .nava{display:block;width:200px;float:left;color:#fff;text-decoration:none;text-align:center;line-height:45px;}