让页面元素浮动位置不变:sticky-elements

y37f 10年前

sticky-elements是jquery固定位置或粘性元素插件,它可以轻松让你的div保持在你想要的位置,可以使其永远保持在视窗内,粘性div可以设置动画效果显示。

View Demo

How to use
<script type="text/javascript" src="../js/jquery.js"></script>  <script type="text/javascript" src="../js/jquery.sticky.elements.js"></script>  <script type="text/javascript">      $("#grid5").stikify({rate: 3.4, cieling: -100});  </script>

just include jQuery, our stiky element plugin & you have juststikifiedit!

$("#grid4").stikify({floor: 100, rate: 1.6, cieling: -100, trans: true, rate: 3.4});

means:

  • The gridid - grid4will not go below 100px height, above -100px height, will get transparent with scroll. Itsscroll-ratewill be3.4times normal scroll!


项目主页:http://www.open-open.com/lib/view/home/1426488567054