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

前端 未结 25 1163
耶瑟儿~
耶瑟儿~ 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:04

    Along with Bootstrap 3 I used this code. The second set of rules just undo what bootstrap does for focus/active buttons:

    button::-moz-focus-inner {
      border: 0;    /*removes dotted lines around buttons*/
    }
    
    .btn.active.focus, .btn.active:focus, .btn.focus, .btn.focus:active, .btn:active:focus, .btn:focus{
      outline:0;
    }
    

    NOTE that your custom css file should come after Bootstrap css file in your html code to override it.

提交回复
热议问题