Remove border around the color in an input[type=color] in Firefox?

后端 未结 3 538
你的背包
你的背包 2020-12-21 17:52

I want to remove the border around the color of input[type=color] in Firefox. I found solution for Chrome here (use ::-webkit-color-swatch in CSS) and I need it for Firefox

相关标签:
3条回答
  • 2020-12-21 18:36

    You can add border-color: transparent to the input box.

    0 讨论(0)
  • 2020-12-21 18:39

    It's similar to ::-webkit-color-swatch.

    ::-moz-color-swatch {
        border-color: red;
    }
    
    0 讨论(0)
  • 2020-12-21 18:53

    It would be better to make it common for all, Try this:

    input[type="text"]{
        border: none;
        border-color: transparent;
    }
    

    or

    If focus is on the input field, Use this:

    input[type="text"]:focus{
        outline: none;
    }
    

    Post your code if this is'nt what you're looking for!

    Update

    Put your code inside ::-moz-color-swatch{ }

    0 讨论(0)
提交回复
热议问题