调用外部字体

   1、下载字体文件,不同浏览器使用不同字体文件格式(

        Chrome:除webkit支持的以外,从Chrome 6开始,开始支持woff格式;

        Firefox:支持.ttf和.otf,从Firefox 3.6开始支持woff格式;

        Opera:支持.ttf、.otf、.svg。

        IE:只支持eot格式,IE9开始支持woff。

   2、声明字体如:

  @ font-face{ 
font-family: 'socials-icons'; src: url('socials-icons.eot'); /* IE9*/ src: url('socials-icons.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('socials-icons.woff') format('woff'),
url('socials-icons.svg#socials-icons') format('svf');/*chrome/firefox*/
url('socials-icons.ttf') format('truetype'),/*chrome/firefox/opera/android*/
}
3、在需要使用该字体的元素上使用。

欢迎访问我们公司的官方网站 徐州思华科技有限公司 www.sihuakeji.com
posted on 2014-07-03 11:22  iColor我彩  阅读(215)  评论(0编辑  收藏  举报