jQuery+Superfish製做下拉菜單

superfish製做下拉菜單真的很方便而好很好用,並且還能夠經過Superfish提供的參數來控制下拉菜單的不一樣效果,並且他沒有層級限制,換句話說能夠經過Superfish來寫你想要的層級菜單。css

官方幫助文檔:html

http://users.tpg.com.au/j_birch/plugins/superfish/#getting-startedide

  1. Begin with a working pure CSS dropdown menu based on nested unordered lists. For each li:hover selector in your CSS, add an equivalent li.sfHover selector. Use display:none rather than left:-9999em to hide submenus. To make this step easy, there are cross-browser CSS files for a variety of menu types available in the download section of this site.
    <link href="superfish.css" rel="stylesheet" media="screen">
  2. Link to the superfish.js file (after including jQuery) using a script tag in the head of your document.
    <script src="jQuery.js"></script> <script src="superfish.js"></script>
  3. Call superfish() on the containing ul element.
    <script> jQuery(document).ready(function() { jQuery('ul.sf-menu').superfish(); }); </script>
    There are many options available to customise your menu. You can find out about them in the Options tab of this site.

這是國內整理文件。ui

http://blog.chinaunix.net/uid-26615074-id-3078698.htmlthis

相關文章
相關標籤/搜索