CSS asp.net 中下拉列表的酷样式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11722682/
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
Cool Styling for dropdown list in asp.net?
提问by Hitesh Gawhade
I wonder if we can give the default dropdownlist a cool and classy look using css/styling. I do not want to use jquery/jscript as I am not familiar with these. Can it be done using css/html styling ?
我想知道我们是否可以使用 css/styling 给默认的下拉列表一个很酷和优雅的外观。我不想使用 jquery/jscript,因为我不熟悉这些。可以使用 css/html 样式来完成吗?
I want it to look something like this :
or
或者
回答by Devin Hurd
Sure you can.
你当然可以。
I recommend checking out http://bavotasan.com/2011/style-select-box-using-only-css/
我建议查看http://bavotasan.com/2011/style-select-box-using-only-css/
It's really just a mix of your standard commands: height, width, background, color, border. All put together to make it prettier. I'm not sure about offsetting it like in your example 2, but example 1 is easy.
它实际上只是标准命令的混合:高度、宽度、背景、颜色、边框。全部放在一起,让它更漂亮。我不确定是否像示例 2 中那样抵消它,但示例 1 很容易。