Inline style to act as :hover in CSS

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

    If it's for debugging, just add a css class for hovering (since elements can have more than one class):

    a.hovertest:hover
    {
    text-decoration:underline;
    }
    
    blah
    

提交回复
热议问题