自定义样式a{ color: #FFFF99; text-decoration: none;}命名必须以.user为前缀
<styletype="text/css">a{color:#FFFF99;text-decoration:none;}a:hover{color:#FFFFFF;tex...
<style type="text/css">a{ color: #FFFF99; text-decoration: none;}
a:hover{ color: #FFFFFF; text-decoration: underline;} #nav{ padding: 10px 10px 0; font-size: 12px; font-weight: bold; margin: 1em 0 0; list-style:none;}
#nav li{ float: left; margin-right: 1px;}
.bi{ position: relative; z-index: 0;}
.bi:hover{ z-index: 99;}
.bi:hover span{ visibility: visible; top: 0; left: 0; cursor: pointer;}
.bi span{ position: absolute; left: -999em; visibility: hidden;}
#nav li a,.bi:hover span{ line-height: 20px; text-decoration: none; background: #DDDDDD; color: #666666; display: block; width: 80px; text-align: center;}
#nav li a:hover,.bi:hover span{ color: #FFFFFF; background: #DC4E1B;}
.bi:hover span{ padding-top: 2px;}
#navbar{ background: #DC4E1B; height: 8px; overflow: hidden; clear: both;}</style><div id="top"> <ul id="nav"> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-0-5-1-24-1.html">首 页<span>Home</span></a> </li> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-60477-1-0-20-1.html">男款<span>About us</span></a> </li> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-512917-1-0-20-1.html">女款<span>Products</span></a> </li> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-512921-1-0-20-1.html">儿童款<span>Services</span></a> </li> </ul> <div id="navbar"> </div></div><noscript></noscript><noscript></noscript>
菜鸟一个 那位大侠出出首 帮忙看一下 这个需要怎么改啊 展开
a:hover{ color: #FFFFFF; text-decoration: underline;} #nav{ padding: 10px 10px 0; font-size: 12px; font-weight: bold; margin: 1em 0 0; list-style:none;}
#nav li{ float: left; margin-right: 1px;}
.bi{ position: relative; z-index: 0;}
.bi:hover{ z-index: 99;}
.bi:hover span{ visibility: visible; top: 0; left: 0; cursor: pointer;}
.bi span{ position: absolute; left: -999em; visibility: hidden;}
#nav li a,.bi:hover span{ line-height: 20px; text-decoration: none; background: #DDDDDD; color: #666666; display: block; width: 80px; text-align: center;}
#nav li a:hover,.bi:hover span{ color: #FFFFFF; background: #DC4E1B;}
.bi:hover span{ padding-top: 2px;}
#navbar{ background: #DC4E1B; height: 8px; overflow: hidden; clear: both;}</style><div id="top"> <ul id="nav"> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-0-5-1-24-1.html">首 页<span>Home</span></a> </li> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-60477-1-0-20-1.html">男款<span>About us</span></a> </li> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-512917-1-0-20-1.html">女款<span>Products</span></a> </li> <li> <a class="bi" href="http://mall.jd.com/view_search-71247-512921-1-0-20-1.html">儿童款<span>Services</span></a> </li> </ul> <div id="navbar"> </div></div><noscript></noscript><noscript></noscript>
菜鸟一个 那位大侠出出首 帮忙看一下 这个需要怎么改啊 展开
2013-10-12
展开全部
不能是用<div id="top">
<ul id="nav">,这种id,而是换成class,如<div class="top">
top这个div外加个div,<div class=user>
然后所有的CSS代码中都加上.user,如#nav li a,.bi:hover span{,需要变更为
.user .nav li a,.user .bi:hover span{
<ul id="nav">,这种id,而是换成class,如<div class="top">
top这个div外加个div,<div class=user>
然后所有的CSS代码中都加上.user,如#nav li a,.bi:hover span{,需要变更为
.user .nav li a,.user .bi:hover span{
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询