安卓微信中 select背景色无法去掉

2018-11-21 11:41:15css问题

写了一个简单的h5页面,就一个select,

select{
    font-size: inherit;
    color: inherit;
    font-style: inherit;
    font-weight: inherit;
    border: none;
    text-decoration: inherit;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    outline: none;
    padding: inherit;
    margin: inherit;
    background: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

<select>
    <option value="123">123</option>
</select>

为什么还有背景色,该怎么去除呢?

clipboard.png

clipboard.png

网友回答:

  • 唯一丶 唯一丶 2018-11-22 8:01 回复:

    通用的方法都是用 将原生的用display隐藏,然后用div+css从新画一个 然后利用 label 实现点击展开