2015-10-22 65 views
0

字体家族的CSS属性没有在Firefox中执行,但在Chrome中完美。在Firefox和IE浏览器中的字体家族CSS属性的问题

安装在Firefox元素检查和镀铬的屏幕截图Firefox element inspector

Chrome element inspector

body { 
    background: #fefefe; 
    color: #777; 
    font-family: 'Roboto' sans-serif !important; 
    font-size: 16px; 
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    -khtml-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
} 
+1

你可以发布CSS而不是图片吗? – Turnip

+0

body { background:#fefefe; 颜色:#777; font-family:'Roboto'sans-serif!important; font-size:16px; -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; } –

回答

1

font-family值应该是逗号分隔。一些浏览器将您的字体名称解释为“'Roboto'sans-serif'不是不可能的。

+0

可用于测试浏览器行为的小提琴:http://jsfiddle.net/2tkhbxp6/1/。在Safari中,格鲁吉亚的格式不正确,这意味着在''font-family:Helvetica serif;''声明中看不到Helvetica。 – Tony

+0

.. !!!!!逗号和分号是我有忘记习惯的那些...... !!!! –

相关问题