• 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;
    }

  • 相关阅读:
    JQuery的摸索之路(一)
    C#操作excel(NPOI篇)
    Mschart学习(MSchart介绍)
    JQuery的摸索之路(二比较)
    Mschart学习(开篇)
    Mschart学习(官方demo共享)
    SQL进阶提升(疑惑篇order by)学习sql server2005 step by step(十一)
    一步一步学习C#(二C#基础)
    NickLee的学习
    Linux 命令学习一
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13317553.html
Copyright © 2020-2023  润新知