问题描述
Ho ho,
使用CSS时。如果CSS样式是相同的a:链接a:visited a:hover a:active确实需要写出来的次数。使用自定义链接。
When working with CSS. If the CSS style is the same for a:link a:visited a:hover a:active does one really have to write it out for times. Working with a custom link.
.DT_compare a:link {
font-family:"Lucida Grande", Arial, sans-serif;
font-size:11px;
line-height:14px;
font-weight:normal;
font-style:normal;
color:#EEE;
text-align:center;
}
任何快捷方式?
Marvelous
Marvellous
推荐答案
只要忘记伪类,只选择 a
:
Just forget the pseudo-classes, and select only a
:
.DT_compare a {
font-family:"Lucida Grande", Arial, sans-serif;
font-size:11px;
line-height:14px;
font-weight:normal;
font-style:normal;
color:#EEE;
text-align:center;
}
这不是一个非常具体的选择器;如果必要,你可以找到一些其他方式来增加它,所以它推翻你的 a:hover
和 a:active
或使用
This isn't a very specific selector though; if necessary you can find some other way to increase it so it overrules your a:hover
and a:active
selectors, or go with whoughton's answer instead and just specify all four of them.
再次,如果你的主要超链接样式适用于 a :hover
和 a:active
之前没有任何东西,只要将 .DT_compare a
规则下面它应该工作正常。
Then again, if your main hyperlink styles apply to a:hover
and a:active
without anything before them, as long as you place your .DT_compare a
rule beneath them it should work fine.
这篇关于CSS同样的风格为a:链接a:访问a:hover a:active,真的要写出来4次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!