如何在HTML中设置font-family选择下拉列表中的IE? [英] How to set font-family in HTML select dropdown list in IE?
问题描述
可能重复:
显然,IE使用operationg系统来渲染控件。
也许您可以使用js小工具,例如这个一个
它需要一个基本的选择,但transorms它与jquery。Possible Duplicate:
Change css font-family for separate options in select tag
Styling options in bold in Internet ExplorerI am not able to set font-family of a dropdown list of HTML select in IE8,9. Is it a bug/property or am I doing something wrong? Font-size setting works. The example is too extreme my real problem is that I have different font on the page and in the list.
I don't care about IE7-.Example( http://jsfiddle.net/SDcLX/11/):
I have following HTML:
aaaaa <div class="container"> skjhlks <select> <option class="courier">courier</option> <option>aa</option> <option style="font-family:impact;" selected="selected" >bb</option> </select> </div>
and CSS
.container { font-size:30px; font-family:Lucida Handwriting; } select { font-family:inherit; font-size:inherit; } option.courier { font-family:courier; }
The result in FF is:
and in IE:
解决方案The question is also a duplicate of styling options in bold in internet explorer
Apparently IE uses the operationg system to render the controls.
Perhaps you can use a js widget instead like this one It takes a basic select but transorms it with jquery.
这篇关于如何在HTML中设置font-family选择下拉列表中的IE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!