HTML选择字体大小 [英] HTML select font-size
问题描述
我无法在OS X Safari和Chrome上设置HTML < select>
font-size。基本上这个属性被忽略了,除非我放大或缩小,在这种情况下,这个属性被魔法识别。任何人看过相同的东西/知道解决方法? OS X Firefox可以正常工作,这使我认为这是一个Webkit问题。
你需要关闭默认操作系统样式: -webkit-appearance:none;
(如果您制作的是高度风格的下拉菜单,则基本上是一个完整的样式)
您也可以尝试: -webkit-appearance:menulist-button;
(虽然我不确定其他风格效果会如何影响这个效果。)
I'm having trouble setting HTML <select>
font-size on OS X Safari and Chrome. Basically the attribute is ignored, unless I zoom in or out in which case the attribute is magically recognised. Anyone seen the same thing / know of a workaround ? Works fine with OS X Firefox, which leads me to think it's a Webkit issue.
You'll need to turn off the default OS styling with: -webkit-appearance: none;
(If you're making a highly-styled dropdown, this is essentially a complete style reset.)
You could also try: -webkit-appearance: menulist-button;
(Though I'm not sure how other style effects will affect this one.)
这篇关于HTML选择字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!