0
當我在Google Chrome中加載網站時,使用Lato字體的文本不會隨機顯示(在模式或導航標題鏈接中)。懸停樣式化鏈接後,或者在Inspector中重新觸發任何CSS屬性 - 文本變得可見。Google字體(Lato)不在Google Chrome上呈現
我試過不同的解決方案,如this,但沒有爲我工作。
我在本地加載字體。這是我的字體scss:
// Lato
//
// The Lato font in a Sass format to be imported easily in any
// project.
// sass-lint:disable no-duplicate-properties
$fontface-src: '../assets/fonts' !default;
// Regular
@font-face {
font-family: 'Lato';
src:
url($fontface-src + '/lato/Lato-Regular.svg')
format('svg'),
url($fontface-src + '/lato/Lato-Regular.ttf')
format('truetype'),
url($fontface-src + '/lato/Lato-Regular.woff')
format('woff'),
url($fontface-src + '/lato/Lato-Regular.eot'),
url($fontface-src + '/lato/Lato-Regular.eot?#iefix')
format('embedded-opentype');
font-weight: normal;
font-weight: 400;
font-style: normal;
}
// Light
@font-face {
font-family: 'Lato';
src:
url($fontface-src + '/lato/Lato-Light.svg') format('svg'),
url($fontface-src + '/lato/Lato-Light.ttf')
format('truetype'),
url($fontface-src + '/lato/Lato-Light.woff')
format('woff'),
url($fontface-src + '/lato/Lato-Light.eot'),
url($fontface-src + '/lato/Lato-Light.eot?#iefix')
format('embedded-opentype');
font-weight: normal;
font-weight: 300;
font-style: normal;
}
你能舉個例子嗎? – RacoonOnMoon