【发布时间】:2017-04-02 11:57:27
【问题描述】:
我的网页有很多没有类的<a>,它们的属性在css中设置如下:
a{
text-decoration:none;
color:black;
}
a:hover, a:active{
color:green;
}
现在我有了带有class="tnc" 的<a> 标记,我希望它具有默认属性,即带有下划线的蓝色文本,并且在激活时它会变为红色文本。
我试过了,但没用:
a.tnc{
color: initial;
text-decoration: initial;
}
a.tnc:hover, a.tnc:active{
color: initial;
}
感谢任何帮助。 :)
a:hover, a:active{
color:green;
}
a.tnc{
color: initial !important;
text-decoration: initial;
}
a.tnc:hover, a.tnc:active{
color: initial;
}
I agree with the <a class="tnc" href="#">terms and conditions</a>
【问题讨论】:
-
请发布您的 HTML。
标签: html css hyperlink colors default