Remove dotted outline from range input element in Firefox

前端 未结 10 950
忘了有多久
忘了有多久 2020-12-08 12:33

Firefox, since version 23, natively supports the element, but I couldn’t figure out how to remove the dotted outline. The following

10条回答
  •  無奈伤痛
    2020-12-08 13:12

    Unfortunately, you can't! (update; you now can)

    It's a bug in Firefox and there is no work-around to fix this besides from fixing the source base itself (see below).

    Also see Jonathan Watt's blog (who is working on this):

    Known issues:

    • the default CSS styled appearance still needs work, and native theming (giving the slider the appearance of the operating system's theme) is still to come ...

    In a reply to a comment in his blog about this very same issue he states:

    Right now you can't - sorry. I've filed bug 932410 to make that possible.

    At the moment of writing there appear to be no progress on this and it's not known when a official fix will be available.

    Update

    Since this answer was posted the bug has been fixed. You can now use (as stated in other answers, but I include it here for completeness):

    input[type=range]::-moz-focus-outer {
        border: 0;
        }
    

提交回复
热议问题