Home > Web Front-end > HTML Tutorial > 让页面元素浮动位置不变:sticky-elements_html/css_WEB-ITnose

让页面元素浮动位置不变:sticky-elements_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:14:59
Original
1343 people have browsed it

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>
Copy after login

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

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

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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template