缩短逗号分隔的CSS选择器 [英] Shorten the comma separated CSS selectors
本文介绍了缩短逗号分隔的CSS选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
也许这个问题的标题不明确,我真正的意思是:
Maybe the title of this question is ambiguous, what I really mean is:
#footer_list li a:link, #footer_list li a:visited
{
blah balh blah
}
CSS中有两个元素的快捷方式?所以CSS选择器可以缩短
Is there a shortcut for the two elements in CSS? so the CSS selectors can be shortened
推荐答案
当然。如果你给他们各自自己的类/ id名称。但这是不必要的。您拥有的代码是完全可以接受的,因为CSS 是级联样式表,规则本质上是级联的。
Sure. If you give them each their own respective class/id names. But thats unnecessary. The code you have is perfectly acceptable, as CSS is Cascading Style Sheets, the rules cascade down essentially.
这篇关于缩短逗号分隔的CSS选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文