为< select>设置字体样式.和< option> FireFox/Mozilla中的标签 [英] Style the font for <select> and <option> tags in FireFox / Mozilla

查看:404
本文介绍了为< select>设置字体样式.和< option> FireFox/Mozilla中的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在FireFox中,不能使用CSS更改<option>标记之间的字体. (可以在Chrome中使用普通的CSS语句完成此操作.)我可以使用CSS更改语句的<select>部分的字体,以便所选的选项以所需的字体显示,但标记始终使用FireFox的默认字体.这很重要,因为我想在选项标签中使用等宽字体.

The font between the <option> tags cannot be changed with CSS in FireFox. (It can be done, using normal CSS statements, in Chrome.) I can change the font for the <select> part of the statement using CSS, so that the selected option appears in my desired font, but the text between the <option> tags in the dropdown list are always in FireFox's default font. This is important because I want to use a monospace font in the option tags.

我可以控制FireFox中<option>标签中字体的样式吗?

Can I gain control over style of the font in the <option> tag in FireFox?

我的客户告诉我他们以前在FireFox的下拉选择列表中看到等宽字体-直到几周前. FireFox是否更改了它们使用<option><select>标签中的CSS呈现指令以更改字体的方式?有人知道吗?

My clients are telling me they used to see the monospace font in a dropdown select list in FireFox - until a few weeks ago. Did FireFox change the way they render a directive to change the font using CSS in the <option> and <select> tags? Does anyone know?

我已经读到标准"没有指定选项标签之间的内容必须是可样式化的-但是某些浏览器(例如Chrome)仍然会渲染CSS,而FireFox不会.

I have read that "the standard" does not specify that the contents between the option tags must be stylable - but that some browsers, like Chrome, render the CSS anyway, while FireFox does not.

推荐答案

问题尚未得到解答.似乎不可能更改

The question has not been answered. It seems impossible to change the font of the

<option>content</option>

FireFox中选项标签之间的

文本.它确实可以在Chrome浏览器中工作.

text between the option tags in FireFox. It does work in Chrome.

这篇关于为&lt; select&gt;设置字体样式.和&lt; option&gt; FireFox/Mozilla中的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆