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

  • 相关阅读:
    linux命令行总结给自己看的版本
    搜集关于人脸识别的评价指标时的感慨
    配置面部数据增加的代码环境流程记录
    关于Linux前后台进程切换
    【转&改进】Linux MPI 单机配置
    How did I Install DCGAN
    kali的安装
    TensorFlow的安装
    strcmp用法
    分享一个MVC的多层架构,欢迎大家拍砖斧正
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13317553.html
Copyright © 2011-2022 走看看