Inline style to act as :hover in CSS

前端 未结 7 2247
梦毁少年i
梦毁少年i 2020-12-01 02:11

I know that embedding CSS styles directly into the HTML tags they affect defeats much of the purpose of CSS, but sometimes it\'s useful for debugging purposes, as in:

<
7条回答
  •  日久生厌
    2020-12-01 03:00

    If that

    tag is created from JavaScript, then you do have another option: use JSS to programmatically insert stylesheets into the document head. It does support '&:hover'. https://cssinjs.org/

提交回复
热议问题