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

前端 未结 12 1633
囚心锁ツ
囚心锁ツ 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 06:56

    Try with this CSS:

    For Mozilla:

    |:-moz-any-link:focus { outline: none; }
    
    |:focus { outline: none; }
    
    button, input[type="reset"], input[type="button"], input[type="submit"] { outline: none; }
    
    button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner { padding: 0px 2px 0px 2px; border: 1px dotted transparent; }
    

    For IE8:

    a:active, a:focus { 
        border:none;
        outline:none;
    }
    

提交回复
热议问题