特效描述:利用jQuery实现 全屏滚动 切换菜单。利用jQuery实现全屏滚动切换菜单插件
代码结构
1. 引入CSS
<link rel="stylesheet" href="assets/css/style.css" /> <link rel="stylesheet" href="assets/css/jquery.sectionmenu.css" />
2. 引入JS
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script> <script type="text/javascript" src="assets/js/jquery.easing.min.js"></script> <script type="text/javascript" src="assets/js/jquery.fragmentscroll.min.js"></script> <script type="text/javascript" src="assets/js/jquery.sectionmenu.min.js"></script>
3. HTML代码
<div id="page"> <section id="home" class="container" data-section-menu="Description"> <h1>Description</h1> <p>The jQuery section menu plugin creates a side menu <br />that allows you to scroll to the different sections <br />on the page.</p> <p>Use the side menu at the right to <br />scroll trough the page.</p> </section> <section id="section1" class="container" data-section-menu="Section 1"> <h1>Section 1</h1> <p>We created some sections<br />to play with.</p> </section> <section id="section2" class="container" data-section-menu="Section 2"> <h1>Section 2</h1> <p>We created some sections<br />to play with.</p> </section> <section id="section3" class="container" data-section-menu="Section 3"> <h1>Section 3</h1> <p>We created some sections<br />to play with.</p> </section> </div> <div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"> </div>