jQuery+Superfish制作下拉菜单
superfish制作下拉菜单真的很方便而好很好用,而且还可以通过Superfish提供的参数来控制下拉菜单的不同效果,而且他没有层级限制,换句话说可以通过Superfish来写你想要的层级菜单。
官方帮助文档:
http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started
- 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 thanleft:-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">
- 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>
- Call superfish() on the containing ul element.
There are many options available to customise your menu. You can find out about them in the Options tab of this site.<script> jQuery(document).ready(function() { jQuery(‘ul.sf-menu‘).superfish(); }); </script>
这是国内整理文件。
http://blog.chinaunix.net/uid-26615074-id-3078698.html
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。