我可以定位所有< H>吗?有一个选择器的标签? [英] Can I target all <H> tags with a single selector?
本文介绍了我可以定位所有< 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;
}
(但显然这是行不通的)
(but obviously this doesn't work)
推荐答案
否,在这种情况下,您要使用逗号分隔的列表.
No, a comma-separated list is what you want in this case.
这篇关于我可以定位所有< H>吗?有一个选择器的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文