代码之家  ›  专栏  ›  技术社区  ›  Sergey

Internet Explorer:下拉列表不显示选项字体系列

  •  1
  • Sergey  · 技术社区  · 16 年前
    #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显示不同的字体。有人知道什么工作吗?

    谢谢你

    1 回复  |  直到 16 年前
        1
  •  1
  •   K Prime    16 年前

    有些表单元素不能在IE中设置样式-我看到的唯一选项是通过dhtml/js创建自己的控件。

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