实现后的效果图,如下:
实现代码如下:
menu4.html a{ display: block; height:38px; /* width:107px; */ /* line-height: 2; */ line-height: 38px; text-align: center; background: url(./c2.jpg) no-repeat 0px 0px; color:#d84700; font-size: 14px; weight:bold; text-decoration: none; padding-left: 18px; float:left; margin:5px;}a span{ display: block; background: url(./c2.jpg) no-repeat right 0px; padding-right: 20px;}a:hover{ background: url(./c2.jpg) no-repeat 0px -38px;}a:hover span{ background: url(./c2.jpg) no-repeat right -38px;}免费注册 登入 在网上开店
查看更多关于css+html实现自适应宽度的菜单学习_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did105499