样式化 HTML 选择
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3418280/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Styling HTML Select
提问by Dismissile
Is it possible to style the HTML Select attribute to be more flat looking? I can set the border to be 1px solid but the dropdown portion still looks 3D and ugly looking.
是否可以将 HTML Select 属性的样式设置得更扁平?我可以将边框设置为 1px 实心,但下拉部分仍然看起来 3D 和难看。
回答by Chris Van Opstal
Unfortunately, no.
抱歉不行。
Take a look at this answerfor some other options using JavaScript and what you can style using CSS.
查看此答案,了解使用 JavaScript 的其他一些选项以及您可以使用 CSS 设置的样式。