zoukankan      html  css  js  c++  java
  • ie8关于@font-face无效的兼容问题

    我之前是这么用的,如下
    @font-face {
        font-family: "yhg";
        src: url(../fonts/yhg.eot); 
        src: url(../fonts/yhg.woff) format('woff'),
              url(../fonts/yhg.ttf) format('truetype'),
              url(../fonts/yhg.eot?#iefix) format('embedded-opentype'),  
              url(../fonts/yhg.svg#yhg) format('svg');
        font-weight: normal;
        font-style: normal;
    }
    .s23:before,.s24:before{
        font-family: 'yhg';
        speak: none;
        font-style: normal;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        position: relative;
        -webkit-font-smoothing: antialiased;
    }
    .s23:before{
        content: "e600";
    }
    .s24:before{
        content: "e601";
    }
    发现ie8显示不出来字体,折腾了半天,是@font-face的顺序写错了。
    正确的应该是这样:
    @font-face {
        font-family: "yhg";
        src: url(../fonts/yhg.eot);
        src: url(../fonts/yhg.eot?#iefix) format('embedded-opentype'),  
              url(../fonts/yhg.woff) format('woff'),
              url(../fonts/yhg.ttf) format('truetype'),
              url(../fonts/yhg.svg#yhg) format('svg');
        font-weight: normal;
        font-style: normal;
    }

  • 相关阅读:
    因浮动问题导致的IE6/7下的换行
    弹性回到顶部js代码
    页面图片的缩放问题
    js练习小结
    地址给的越精确,优先级越高
    判断IE浏览器的版本
    img图像对齐的方式
    三级导航收缩下拉框
    功能已经实现
    AE创建一个空白的Shapefile
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13317553.html
Copyright © 2011-2022 走看看