@font-face {
  font-family: \'Glyphicons Halflings\';

  src: url(\'../fonts/glyphicons-halflings-regular.eot\');
  src: url(\'../fonts/glyphicons-halflings-regular.eot?#iefix\') format(\'embedded-opentype\'), url(\'../fonts/glyphicons-halflings-regular.woff2\') format(\'woff2\'), url(\'../fonts/glyphicons-halflings-regular.woff\') format(\'woff\'), url(\'../fonts/glyphicons-halflings-regular.ttf\') format(\'truetype\'), url(\'../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular\') format(\'svg\');
}

 例子2

@font-face {
    font-family: Muiicons;
    font-weight: normal;
    font-style: normal;
    src: url(\'fonts/mui.ttf\') format(\'truetype\');
}

.mui-icon {
    font-family: Muiicons;
    font-size: 24px;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    display: inline-block;
    text-decoration: none;
    -webkit-font-smoothing: antialiased;
}

 

版权声明:本文为gaidalou原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/gaidalou/p/11161715.html