6条回答
  •  悲&欢浪女
    2021-02-07 21:18

    The style attribute is more specific than any selector, so it will always be applied last in the cascade (horrible !important rules not withstanding). Move the CSS to the stylesheet.

    a.hover {
        color: red;
        text-decoration: none;
    }
    
    a.hover:hover {
        text-decoration: underline;
    }
    

    (I also suggest a more semantic name for the class).

提交回复
热议问题