我已經加入到我的我的網頁添加字體樣式與CSS
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700,700italic,400italic&subset=latin,cyrillic' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic&subset=latin,cyrillic' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Philosopher:400,400italic,700,700italic&subset=latin,cyrillic' rel='stylesheet' type='text/css' />
這些字體的風格我怎樣才能將它們添加到我的頁面的CSS,使我沒有在我的CSS這些外部鏈接
我想這
@font-face {
font-family: 'Roboto';
src: url('https://fonts.googleapis.com/css?family=Roboto:400,700,700italic,400italic&subset=latin,cyrillic');
}
但在我的控制檯(我用Mlozilla)我有
下載的字體:通過消毒
拒絕在Chrome中的錯誤說:
無法解碼下載的字體:https://fonts.googleapis.com/css?family=Roboto:400,700,700italic,400italic&subset=latin,cyrillic
然後我下載與的Roboto字體相關的文件,並試圖
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('../../content/fonts/roboto/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
但沒有任何反應。
http://stackoverflow.com/questions/35203696/source- sans-pro-font-in-html/35204067#35204067 –