zoukankan      html  css  js  c++  java
  • iconfont 字库入门到精通

    字库使用必备三步骤

    第一步:使用font-face声明字体

    @font-face {font-family: 'iconfont';
        src: url('iconfont.eot'); /* IE9*/
        src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
        url('iconfont.woff') format('woff'), /* chrome、firefox */
        url('iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
        url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
    }
    

    第二步:定义使用iconfont的样式

    .iconfont{
        font-family:"iconfont" !important;
        font-size:16px;font-style:normal;
        -webkit-font-smoothing: antialiased;
        -webkit-text-stroke- 0.2px;
        -moz-osx-font-smoothing: grayscale;}
    

    第三步:挑选相应图标并获取字体编码,应用于页面

    <i class="iconfont">&#x33;</i>

    了解到以上步骤之后,回到项目图标管理

    鼠标移动到图标上面,出现下载提示

    下载之后放入所指定目录

    更改声明中的url指向

    @font-face {font-family: 'iconfont';
    src: url('../font/iconfont.eot'); /* IE9*/
    src: url('../font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
    url('../font/iconfont.woff') format('woff'), /* chrome、firefox */
    url('../font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
    url('../font/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
    }

    剩下的就可以使用了,下载目录有实例可以草考

  • 相关阅读:
    《算法图解》——第六章 广度有限搜索
    《算法图解》——第一章 算法简介
    《算法图解》——第二章 选择排序
    go-json处理的问题
    Go断言
    Go Example--格式化字符串
    Go Example--strings
    Go Example--组合函数
    Go Example--defer
    Go Example--panic
  • 原文地址:https://www.cnblogs.com/iqiao/p/4286203.html
Copyright © 2011-2022 走看看