2015-10-22 66 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

.. !!!!!逗號和分號是我有忘記習慣的那些...... !!!! –

相關問題