Setting width with CSS attr()

后端 未结 3 1507
萌比男神i
萌比男神i 2020-12-06 03:44

I\'m trying to set the width of an element using attr() in CSS but it\'s not working. Chrome says \"invalid property value\" but I\'m not sure what\'s wrong.

I\'m tr

3条回答
  •  执笔经年
    2020-12-06 04:42

    Support for attributes other than content is Experimental. In other words, browsers do not support this yet even though it is seemingly valid.

    Here is an example showing that it does work with content, but not width.

提交回复
热议问题