css3 - 如何使用css将select的边框以及右边的小三角形去掉?
大家讲道理
大家讲道理 2017-04-17 11:20:02
0
3
689

最好css2,css3都给出解决方案,效果如下:

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
Peter_Zhu

CSS2 can only be simulated using p and ul. The structure is very simple. For details, please refer to Alice's button-dropdown
CSS3. You can use the CSS3 attribute appearance. The specific code is as follows:

select{
    -moz-appearance: none;
    -webkit-appearance:none;
            appearance:none;  
}
黄舟

Unfortunately, the default style of native form elements is controlled by browser customization, and there is no standard to follow. Different browsers allow you to make varying degrees of modification, but a completely reliable cross-browser solution does not exist. So what the person above said is right, if you want to ensure the consistency of the UI, you can only simulate one yourself.

The following code will be valid on chrome and firefox (but the version coverage is not complete)

-moz-appearance: none;
-webkit-appearance: none;
appearance: none;

However, other browsers don’t know.

黄舟

Why remove it? Simulate a spread.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template