<分区>
<分区>
链接 http://ferrenetwork.com/weavechanges/dataentry.html
这是我使用的html代码
<select id="box1View" multiple="multiple">
<option>2008-2009 "Mini" Baja</option>
<option>AAPA - Asian American Psychological Association</option>
<option>Agape</option>
<option>AGE-Alliance for Graduate Excellence</option>
<option>AICHE (American Inst of Chemical Engineers)</option>
</select>
这是我在我的 css 中使用的样式
#box1View{width:350px; height:350px; border:1px solid #CDCDCD; }
#box1View option {background:#E6E6E6; border: 1px solid #fff; padding: 15px 0 15px 5px;cursor:pointer;}
#box1View option:hover {background:#e0f0f5; cursor:pointer;}
最佳答案
表单元素通常由操作系统而非浏览器呈现。这意味着样式化它们并不总是有效。它可能在某些浏览器中,但它是非标准行为。
<option>
标签实际上无法设置样式。不幸的是,这是设计使然。
来自MSDN (在备注部分):
Except for
background-color
andcolor
, style settings applied through the style object for the option element are ignored.
关于html - 我的选择代码样式在 firefox 中有效,但在 ie 中无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14737286/