
用DW4将它打开,在文件的开头部分可以看到这样一段代码:
this.menuWidth = mw;
this.menuItemHeight = mh;
this.fontSize = fs||12;
this.fontWeight = "plain";
this.fontFamily = fnt||"arial,helvetica,verdana,sans-serif";
this.fontColor = fclr||"#000000";
this.fontColorHilite = fhclr||"#ffffff";
this.bgColor = "#555555";
this.menuBorder = 1;
this.menuItemBorder = 1;
this.menuItemBgColor = bg||"#cccccc";
this.menuLiteBgColor = "#ffffff";
this.menuBorderBgColor = "#777777";
this.menuHiliteBgColor = bgh||"#000084";
this.menuContainerBgColor = "#cccccc";
this.childMenuIcon = "arrows.gif";
注意this.后面的变量名,下面是直接影响菜单效果的变量名对应的菜单属性:
menuWidth: 菜单宽度
menuItemHeight : 菜单条目高度
fontWeight: 菜单条目文字粗细
fontFamily: 菜单条目文字字体
fontSize: 菜单条目文字大小
fontColor: 菜单条目文字颜色
fontColorHilite: 菜单条目文字高亮色(即鼠标移到菜单上时文字的颜色)
bgColor: 菜单暗边背景色
menuBorder: 菜单边框宽度
menuItemBorder: 菜单条目边框宽度(其实是菜单内各条目之间分隔线的宽度)
menuItemBgColor: 菜单条目背景色
menuLiteBgColor: 菜单亮边背景色
menuBorderBgColor: 菜单边框背景色
menuHiliteBgColor: 菜单条目背景高亮色(即鼠标移到菜单上时背景的颜色)
childMenuIcon: 子菜单扩展标记(默认是个小黑箭头)
弹出菜单的样式是遵循下图中的规则的,大家可以细细研究一下,对照起来修改参数。

由于篇幅限制,笔者在这里就不赘述了,先给出一个修改其中一些参数的样例,余下的大家可以自行测试:
this.bgColor = "#000000";
this.menuBorder = 1;
this.menuItemBorder = 1;
this.menuItemBgColor = bg||"#cccccc";
this.menuLiteBgColor = "#000000";
this.menuBorderBgColor = "";
this.menuHiliteBgColor = bgh||"#000084";
this.menuContainerBgColor = "#cccccc";
this.childMenuIcon = "arrows.gif";
存盘,回到菜单的HTML文件,F12预览,菜单样式已经发生了变化,菜单边框变细致了,是不是很cool啊!


上一篇:超酷图标教你做(上)
共有 0 位网友发表了评论,平均得分: 0 查看完整内容