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

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

    Tested on Firefox 46 and Chrome 49 using this code.

    input:focus, textarea:focus, button:focus {
        outline: none !important;
    }
    

    Before (white dots are visible )

    After ( White dots are invisible )

    If you want to apply only on few input fields, buttons etc. Use the more specific code.

    input[type=text] {
      outline: none !important;
    }
    

    Happy Coding!!

提交回复
热议问题