Remove underline only from anchor element child

前端 未结 7 795
故里飘歌
故里飘歌 2020-12-10 12:02

When an a tag contains child elements, like an i tag, it\'s still applying the underline to it on hover, and I\'m wondering how to remove the under

7条回答
  •  情深已故
    2020-12-10 12:37

    Simply add display:inline-block;

    FIDDLE DEMO

    a:hover i {
        display:inline-block;
        text-decoration:none !important;
    }
    

提交回复
热议问题