#main{height:2000px}
.demo{width:180px; height:250px; margin:10px; border:2px solid #ccc; background:#eee; padding:10px; }
#demo1{position:relative; margin-top:-290px;}
#demo2{position:absolute; margin-top:156px; right:10px;}
.demo a{text-decoration:underline; cursor:pointer}
.demo h3{font-size:14px}
.demo p{line-height:20px}
Demo 1
滚动鼠标滚轮或者拖动浏览器的滚动条看看。
Demo 2
你可以通过点击下面的链接来开启和关闭浮动层的跟随滚动效果。
启动开关
helloweba
jQuery实现浮动层跟随页面滚动效果
Powered by helloweba.com 允许转载、修改和使用本站的DEMO,但请注明出处:www.helloweba.com



