Easy Scroll这是一个非常简单的jQuery自定义滚动条插件、 易于使用的脚本。下载后可以立即使用。
1.添加 CSS 和 JQUERY 文件
<!-- include CSS & JS files --> <!-- CSS file --> <link rel="stylesheet" type="text/css" href="easyscroll.css" media="screen" /> <!-- jQuery files --> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="easyscroll.js"></script>
2.添加你的 HTML
<!-- basic exemple --> <div class="container"> <div class="div_scroll"> <div style="width: 1000px; height: auto; float: left; margin-top: 4px; margin-bottom: 8px"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec in ligula id sem tristique ultrices eget id neque. Duis enim turpis, tempus at accumsan vitae, lobortis id sapien. Pellentesque nec orci mi, in pharetra ligula. Nulla facilisi. Nulla facilisi. Mauris convallis venenatis massa, quis consectetur felis ornare quis. Sed aliquet nunc ac ante molestie ultricies. Nam pulvinar ultricies bibendum. Vivamus diam leo, faucibus et vehicula eu, molestie sit amet dui. Proin nec orci et elit semper ultrices. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed quis urna mi, ac dignissim mauris. Quisque mollis ornare mauris, sed laoreet diam malesuada quis. Proin vel elementum ante. Donec endrerit arcu ac odio tincidunt posuere. Vestibulum nec risus eu lacus semper viverra. Mauris convallis venenatis massa, quis consectetur felis ornare quis. Sed aliquet nunc ac ane molestie ultricies. Nam pulvinar ultricies bibendum. Vivamus diam leo, faucibus et vehicula eu, molestie sit amet dui. Proin nec orci et elit.</p> </div> </div> </div>
3.现在,调用 EASYSCROLL 插件
<script type="text/javascript"> $(document).ready(function(){ $(".div_scroll").scroll_absolute({arrows:true}); }); </script>
屏幕截图
title="easyscroll.png"/>