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

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

    [Update] This solution doesn't work anymore. The solution that worked for me is this one https://stackoverflow.com/a/3844452/925560

    The answer marked as correct didn't work with Firefox 24.0.

    To remove Firefox's dotted outline on buttons and anchor tags I added the code below:

    a:focus, a:active, 
    button::-moz-focus-inner,
    input[type="reset"]::-moz-focus-inner,
    input[type="button"]::-moz-focus-inner,
    input[type="submit"]::-moz-focus-inner,
    select::-moz-focus-inner,
    input[type="file"] > input[type="button"]::-moz-focus-inner {
        border: 0;
        outline : 0;
    }
    

    I found the solution here: http://aghoshb.com/articles/css-how-to-remove-firefoxs-dotted-outline-on-buttons-and-anchor-tags.html

提交回复
热议问题