string concatenation in css

后端 未结 4 1081
轻奢々
轻奢々 2020-12-03 13:32

I want to achieve the following in css. How do i do it in a way that works in IE8+

url(\'../img/icons/\' + attr(\'type\') + \'_10.png\')
4条回答
  •  孤街浪徒
    2020-12-03 14:19

    I don't think you can. In the content property you can "concatenate" just by separating with a space, but in other places I don't think there is such a feature. Which is a shame.

    You'll probably be best off specifying this style in a style attribute whenever the type attribute is used.

提交回复
热议问题