css - 互联网浏览器 : drop down does not display option font family

标签 css internet-explorer drop-down-menu font-family

#select-arial { font-family: Arial; }
#select-verdana { font-family: Verdana; }
#select-geneva { font-family: Geneva; }
#select-sans-serif { font-family: Sans-Serif; }
#select-courier { font-family: Courier; }
#select-monospace { font-family: Monospace; }
#select-georgia { font-family: Georgia; }

    <select name="font_select">
        <option id="select-arial" value="Arial">Arial</option>
        <option id="select-verdana" value="Verdana">Verdana</option>
        <option id="select-geneva" value="Geneva">Geneva</option>
        <option id="select-sans-serif" value="Sans-Serif">Sans-Serif</option>
        <option id="select-courier" value="Courier">Courier</option>
        <option id="select-monospace" value="Monospace">Monospace</option>
        <option id="select-georgia" value="Georgia">Georgia</option>
    </select>

Internet Explorer 不会显示不同的字体,而 Firefox 和 Safari 会。有人知道解决方法吗?

谢谢

最佳答案

某些表单元素无法在 IE 中设置样式 - 我看到的唯一选择是通过 DHTML/JS 创建您自己的控件

是这样的:http://v2.easy-designs.net/articles/replaceSelect/

关于css - 互联网浏览器 : drop down does not display option font family,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1938467/

相关文章:

html - 星级在白色背景下不可见

html - angularjs 会在本地工作吗?

html - 如何在 Firefox 和 Internet Explorer 中包含 css 字体?

css - Font Awesome : Not rendering in IE on S3

c# - 检查下拉列表是否已包含动态添加的项目

javascript - 使用 optgroups 对下拉列表进行排序

html - 如何在传单 map 上添加渐变?

css - mean.js 中的背景图像

css - 最小高度在 IE 中不起作用

C# 如何使组合框在选择项目时不突出显示文本