原文:http://dynamicdrive.com/dynamicindex1/chrome/index.htm
htmld代码如下:
代码讲解:
第一个div,"chromemenu"为memu bar,下面的几个div为下拉菜单。注意ID不能重复。
代码的下方有一段js代码,把chromemenu传给该js函数来启动该下拉菜单,若该页面中有
多个下拉菜单的话,直接把ID用逗号分开传给该js函数即可。
For Your Information
You can easily set the alignment of the menu items. Inside
chromestyle.css
, find and edit the line:text-align: center; /*set value to "left", "center", or "right"*/
At the top of "chrome.js", there are a few variables you may want to customize:
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '<img src="down.gif" border="0" />', //specify full HTML to add to end of each menu item with a drop down menu
enablereveal: [true, 8], //enable swipe effect? [true/false, steps (Number of animation steps. Integer between 1-20. Smaller=faster)]
enableiframeshim: 1, //enable "iframe shim" in IE5.5 to IE7? (1=yes, 0=no)