天蓬老师2017-04-17 11:22:02
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;
}
黄舟2017-04-17 11:22:02
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.