Get element's custom css properties (-mystyle) using JavaScript

后端 未结 7 1771
南旧
南旧 2020-11-28 14:13

In an application where certain elements have custom CSS properties, is there any way to retrieve such a value via JavaScript?

e.g.

相关标签:
7条回答
  • 2020-11-28 15:17

    You can't use data-* attributes (html5)? That would at least be valid and not a strange hack.

    0 讨论(0)
提交回复
热议问题