jquery实现浮动的侧栏实例

<!DOCTYPE html> <html> <head> <title>jQuery stickysidebar plugin</title> <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold' type='text/css'> <link href="https://www.jb51.net/css/default.css" media="screen" /> <link href="https://www.jb51.net/css/sticky.css" media="screen" /> </head> <body> <div> <header> <div> <h2>产品列表</h2> <ul> <li> <h3>产品1</h3> <img src="https://www.jb51.net/images/product.png" alt="product image" /> </li> <li> <h3>产品2</h3> <img src="https://www.jb51.net/images/product.png" alt="product image" /> </li> <li> <h3>产品3</h3> <img src="https://www.jb51.net/images/product.png" alt="product image" /> </li> <li> <h3>产品4</h3> <img src="https://www.jb51.net/images/product.png" alt="product image" /> </li> <li> <h3>产品5</h3> <img src="https://www.jb51.net/images/product.png" alt="product image" /> </li> </ul> </div> <div> <div> <h3>这里是浮动的层~</h3> </div> </div> </div> <script src="https://www.jb51.net/js/jquery-1.7.1.min.js"></script> <script src="https://www.jb51.net/js/jquery.easing.1.3.js"></script> <script src="https://www.jb51.net/js/stickysidebar.jquery.js"></script> <script> $(function () { $("#basket").stickySidebar({ timer: 400 , easing: "easeInOutBack" }); }); </script> </body> </html>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wgdjdp.html