打包的@font-face包

在网页中使用 @font-face 规则嵌入字体,前提是可以从你的网站或第三方 Web 服务器下载到相应的字体。以这种方式提供的字体,会在使用该字体的页面第一次加载时被浏览器下载并缓存起来,以后就不用下载了。但是,除了显示网页之外,用户不能将这种字体用于其他用途。下面就是 Font Squirrel为 Ubuntu Titling Bold字体生成的 @font-face 代码。对于其他来源的字体,这种格式也是适用的。

@font-face {
    font-family:'UbuntuTitlingBold';/*这就是将来在字体栈中引用的字体族的名字*/
    src: url('UbuntuTitling-Bold-webfont.eot'); /* IE9*/
    src: url('UbuntuTitling-Bold-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('UbuntuTitling-Bold-webfont.woff') format('woff'), /* chrome, firefox */
         url('UbuntuTitling-Bold-webfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
         url('UbuntuTitling-Bold-webfont.svg#UbuntuTitlingBold') format('svg'); /* iOS 4.1- */
    font-weight: normal;
    font-style: normal;
}

  

原文地址:https://www.cnblogs.com/luyuefeng/p/8510418.html