首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

超链接a标签只能设置一次样式吗?解决思路

2012-04-28 
超链接a标签只能设置一次样式吗???????????????????????????????????HTML codehtmlheadstyle typet

超链接a标签只能设置一次样式吗???????????????????????????????????

HTML code
<html>    <head>        <style type="text/css">            .main a{                color:yellow;            }            .main a:visited, a:link {                text-decoration:none;                color:yellow;            }            .main a:hover, a:active{                text-decoration:underline;                color:red;            }            .content a{                color:333333;/*为什么content的样式被main覆盖了????????????*/            }            .content a:link, a:visited {                text-decoration:none;                color:333333;            }            .content a:hover,a:active {                text-decoration:underline;                color:2F8AB5;            }        </style>    </head>    <body>        <div class="main">            <a href="a.html">main</a>            <div class="content">                <a href="a.html">content</a>            </div>        </div>    </body></html>


[解决办法]
我拷贝了你的代码测试,正常啊main为黄色,content是另一种颜色
[解决办法]
真的没问题,lz你的浏览器讲的可能是众生平等。。。
[解决办法]
好吧。楼主 你看看你main的div关闭在哪。。。。被你吭了。。。。。
<div class="main">
<a href="a.html">main</a>
<div class="content">
<a href="a.html">content</a>
</div>
</div>

热点排行