Inline style to act as :hover in CSS

前端 未结 7 2200
梦毁少年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:17

    I don't think jQuery supports the pseudo-selectors either, but it does provide a quick way to add events to one, many, or all of your similar controls and tags on a single page.

    Best of all, you can chain the event binds and do it all in one line of script if you want. Much easier than manually editing all of the HTML to turn them on or off. Then again, since you can do the same in CSS I don't know that it buys you anything (other than learning jQuery).

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