How to remove Firefox's dotted outline on BUTTONS as well as links?

前端 未结 25 1169
耶瑟儿~
耶瑟儿~ 2020-11-22 14:23

I can make Firefox not display the ugly dotted focus outlines on links with this:

a:focus { 
    outline: none         


        
25条回答
  •  难免孤独
    2020-11-22 15:15

    If you prefer to use CSS to get rid of the dotted outline:

    /*for FireFox*/
        input[type="submit"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner
        {   
            border : 0;
        } 
    /*for IE8 and below */
        input[type="submit"]:focus, input[type="button"]:focus
        {     
            outline : none; 
        }
    

提交回复
热议问题