IE & Firefox - custom drop down could not remove native arrows

前端 未结 5 2243
清酒与你
清酒与你 2020-12-13 09:40

I\'m trying create a custom drop down control and I need to hide the arrows from the native controls. I\'m using the following CSS, which is working for Chrome

5条回答
  •  天命终不由人
    2020-12-13 10:12

    For Fx I use -moz-appearance: checkbox-container which works nicely.

    So putting it all together the following should be sufficient for you:

    select.desktopDropDown {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: checkbox-container;
        border-style: none;
    }
    select.desktopDropDown::-ms-expand {
        display: none;
    }
    

提交回复
热议问题