青青草免费公开视频,久久A久久综合精品,亚洲欧洲日产国码中文,国产成人精品免费视频大全,亚洲欧美综合精品久久成人,人妻无码av中文系列久久免费

從自己服務(wù)器加載谷歌字體,解決googleapis加載慢的問題

假設(shè)要使用open sans400和700的字體,將IE瀏覽器調(diào)到IE8模式,打開這倆地址,友情提示不翻墻可能打不開。

?

http://fonts.googleapis.com/css?family=Open+Sans:400

http://fonts.googleapis.com/css?family=Open+Sans:700

會(huì)得到這么一段樣式(400的)

1
2
3
4
5
6
7
@font-face {
??font-family: 'Open Sans';
??font-style: normal;
??font-weight: 400;
??src: url(http://themes.googleusercontent.com/static/fonts/opensans/v8/cJZKeOuBrn4kERxqtaUH3fY6323mHUZFJMgTvxaG2iE.eot);
??src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/cJZKeOuBrn4kERxqtaUH3fY6323mHUZFJMgTvxaG2iE.eot) format('embedded-opentype'), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}

里面有倆鏈接,一個(gè)是eot字體,一個(gè)是woff字體,在瀏覽器里分別下載這倆字體,在主題里新建個(gè)fonts目錄,放進(jìn)去,名字改的好認(rèn)點(diǎn),比如opensans.eot,opensans.woff。

然后上面那個(gè)樣式改成下面這樣,直接扔進(jìn)主題樣式表里。

1
2
3
4
5
6
7
@font-face {
??font-family: 'Open Sans';
??font-style: normal;
??font-weight: 400;
??src: url(fonts/opensans.eot);
??src: local('Open Sans'), local('OpenSans'), url(fonts/opensans.eot) format('embedded-opentype'), url(fonts/opensans.woff) format('woff');
}

這樣字體文件就是從自己服務(wù)器加載了,當(dāng)然是用其它CDN服務(wù)也可以。