Can I fetch the value of a non-standard CSS property via Javascript?

前端 未结 6 683
傲寒
傲寒 2020-11-28 12:11

I am trying to read a custom (non-standard) CSS property, set in a stylesheet (not the inline style attribute) and get its value. Take this CSS for example:

         


        
6条回答
  •  暖寄归人
    2020-11-28 12:35

    One way would of course be to write your own CSS-parser in Javascript. But I believe that is really over the top.

提交回复
热议问题