Can I target all tags with a single selector?

后端 未结 10 1673
予麋鹿
予麋鹿 2020-12-04 08:44

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;
}

10条回答
  •  执笔经年
    2020-12-04 09:22

    Stylus's selector interpolation

    for n in 1..6
      h{n}
        font: 32px/42px trajan-pro-1,trajan-pro-2;
    

提交回复
热议问题