如何将 ASP.NET 列表框边框从 3d 更改为 1px 实心?
默认情况下,ASP.NET 中的列表框具有 3D 边框效果。 我需要将其更改为 Solid、1 px、某种颜色。 这可以使用 css 来完成吗?
谢谢, 阿图尔
By default the listbox in ASP.NET has a 3D border effect. I need to change that to Solid, 1 px, some color. Can this be done using css?
Thanks,
Atul
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为对于 ie,选择标签的某些属性不可设置样式。 与与操作系统相关的渲染有关。 不确定ie8。
这是边框样式的内容,但它涉及:
http://v2.easy-designs。网/文章/replaceSelect/
I think that for ie, certain properties of the select tag are not styleable. Something to do with the rendering of it tied to the OS. Not sure about ie8.
Here is something that styles borders, but its involved:
http://v2.easy-designs.net/articles/replaceSelect/
您可以为 ListBox 控件提供一个 CSS 类,然后使用它来定义样式表中您喜欢的边框。
You can give your ListBox control a CSS class and then use that to define the border you like in your stylesheet.
或者您可以使用 Asp.net 主题和皮肤
Or you can use Asp.net Themes and Skins
对于边框,您可以使用 div 作为列表框的父级:
CSS
MARKUP
注意:此解决方案仅适用于 IE8+,不适用于 IE7。
For the border you can use a div as list box's parent:
CSS
MARKUP
Note: This solution only works for IE8+, not IE7.