How to remove dotted border around active hyperlinks in IE8 with CSS

前端 未结 12 1634
囚心锁ツ
囚心锁ツ 2020-11-28 06:31

Active hyperlink texts are highlighted with dotted border. When using effects on such hyperlinks (fadeIn/fadeOut) it produces strange effects. How do I disable/remove the do

12条回答
  •  渐次进展
    2020-11-28 07:09

    Try this CSS:

    a:active, a:selected, a:visited { 
        border: none;
        outline: none;
    }
    

    Note that this has to be after any a:hover rules. Thanks to PEra in the comments for suggesting using the a:selected selector as well.

    NOTE

    The above does not work in IE 9. Removing a:selected causes it to work in IE9.

提交回复
热议问题