css实现导航菜单带背景图效果,sky整理收集。
ul,li{ list-style:none; float:left;}
body{ font-size:12px; line-height:1.6; font-family:Verdana, "宋体", Arial; text-align:center;}
#info li{ margin-left:4px; margin-top:15px;}
#info a {display:block;text-align:center; padding-left:15px;
padding-top:2px;padding-bottom:1px;background-image:
url(/upload/201007/20100714195929854.gif);
background-repeat: no-repeat;color: #000; width:47px; cursor:hand; text-decoration: none;}
#job a:link,#job a:visited{background-position: -62px 0px;}
#eve a:link,#eve a:visited{background-position: -124px 0px;}
#oth a:link,#oth a:visited{background-position: -186px 0px;}
#car a:hover ,#car a:active {background-position: 0px -22px; color:#fff;}
#job a:hover ,#car a:active {background-position: -62px -22px; color:#fff;}
#eve a:hover ,#car a:active {background-position: -124px -22px; color:#fff;}
#oth a:hover ,#car a:active {background-position: -186px -22px; color:#fff;}
">脚本之家,站长必备的高质量网页特效和广告代码。jb51.net,站长js特效。
首页
zz
特效
站长
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
推荐阅读
IE6图片加载的一个BUG解决方法
代码如下: 复制代码 代码如下: <!--[if IE 6]><script type="text/javascript"> try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {} </script><![endif]--> 注:这个BUG以前就已经>>>详细阅读
本文标题:CSS实现同一背景图的导航菜单
地址:http://www.17bianji.com/kaifa2/JS/26043.html
1/2 1