CSS目标所有H标签 [英] CSS Target All H Tags
本文介绍了CSS目标所有H标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想定位网页上的所有h标记。我知道你可以这样做...
I'd like to target all h tags on a page. I know you can do it this way...
h1,
h2,
h3,
h4,
h5,
h6 {
font: 32px/42px trajan-pro-1,trajan-pro-2;
}
但是使用高级CSS选择器有更有效的方法吗?
but is there a more efficient way of doing this using advanced CSS selectors? e.g something like ....
[att^=h] {
font: 32px/42px trajan-pro-1,trajan-pro-2;
}
(但显然不行)
推荐答案
不,以逗号分隔的列表是你想要的。
No, a comma-separated list is what you want in this case.
这篇关于CSS目标所有H标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文