二个css按钮式水平下拉菜单代码

发布时间:2019-12-20编辑:脚本学堂
分享二个css按钮式水平下拉菜单代码,实例学习css下拉菜单的实现方法,需要的朋友参考下。

css下拉菜单的演示效果截图:推荐:css下拉菜单
 

css下拉菜单
css按钮式菜单

用到的图片:

css下拉菜单

1,css代码(下拉菜单)
 

.hbuttons a{display: block;text-decoration: none;font: bold 13px Arial;
color: black;width: 78px;height: 23px;float: left;display: inline;
margin-right: 8px;background-image:url(tabsquare.jpg);background-repeat: no-repeat;
padding-top: 4px;text-align:center;}
.hbuttons a:hover{background-image:url(tabsquareover.jpg);}
.bbuttons a{display: block;text-decoration: none;font: bold 13px Arial;
color: black;width: 78px;height: 23px;float: left;display: inline;
margin-right: 8px;background-image:url(menu.jpg);background-repeat: no-repeat;
padding-top: 4px;text-align:center;}
.bbuttons a:hover{background-image:url(menuover.jpg);}

2,html部分
 

<div class="hbuttons">
<a href="http://www.yuju100.com">Home</a>
<a href="http://www.yuju100.com">Submit</a>
<a href="http://www.yuju100.com">Resources</a>
<a href="http://www.yuju100.com">Contact</a>
</div>
<div style="clear: left;"></div>
<div class="bbuttons">
<a href="http://www.yuju100.com">Home</a>
<a href="http://www.yuju100.com">Submit</a>
<a href="http://www.yuju100.com">Resources</a>
<a href="http://www.yuju100.com">Contact</a>
</div>
<div style="clear: left;"></div>