Read :hover pseudo class with javascript

前端 未结 5 1530
时光说笑
时光说笑 2020-11-29 11:55

I made a function that overwrite the the :hover of some elements on a page. It fades between the normal and the :hover effect. That for i had to create a .hover class in my

5条回答
  •  旧时难觅i
    2020-11-29 12:37

    You could access document.styleSheets and look for a rule that is applied on that specific element. But that’s not any cleaner than using a simple additional class.

提交回复
热议问题