如何将不同的样式应用于HTML中选择标签的选项

编程入门 行业动态 更新时间:2024-10-27 06:20:30
本文介绍了如何将不同的样式应用于HTML中选择标签的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图在下拉选项上应用一些CSS类。 CSS在Firefox中正确应用,但在IE(7,8)中,只有颜色被应用。任何机构都可以告诉我如何在IE 7和IE 8的下拉选项上应用样式。

.regionOption { font-weight:bold; } .countryOption { margin-left:10px; padding-left:5px; }

根据条件,我在选项上使用这些CSS类。他们在Firefox中工作得很好。

我想显示区域和国家之间的区别,有没有其他方法?

感谢 Ashwani

解决方案

目前支持选项元素的全部样式。

支持样式的完整列表出现在以下MSDN文章标题为样式的部分中:

http ://msdn.microsoft/en-us/library/ms535877%28VS.85%29.aspx

I am trying to apply some CSS class on the options of a drop down. The CSS apply correctly in Firefox, but in IE (7, 8) only color is getting applied. Can any body tell me how to apply styles on options of drop down for IE 7 and IE 8.

.regionOption { font-weight: bold; } .countryOption { margin-left: 10px; padding-left:5px; }

I am using these CSS classes on options depending upon conditions. They work fine in Firefox.

I want to show difference between Region and country, is there any other way?

Thanks Ashwani

解决方案

Internet Explorer does not currently support the full range of styles on option elements.

The full list of supported styles appears on the following MSDN article under the section titled "Styles":

msdn.microsoft/en-us/library/ms535877%28VS.85%29.aspx

更多推荐

如何将不同的样式应用于HTML中选择标签的选项

本文发布于:2023-07-13 03:19:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1099787.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用于   如何将   样式   选项   标签

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!