惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
Latest news
Latest news
K
Kaspersky official blog
Attack and Defense Labs
Attack and Defense Labs
Cisco Talos Blog
Cisco Talos Blog
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
V2EX - 技术
V2EX - 技术
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
W
WeLiveSecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
PCI Perspectives
PCI Perspectives
S
Security @ Cisco Blogs
A
Arctic Wolf
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Check Point Blog
云风的 BLOG
云风的 BLOG
N
News | PayPal Newsroom
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
Cloudbric
Cloudbric
F
Fortinet All Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
T
Threat Research - Cisco Blogs
L
LangChain Blog
Spread Privacy
Spread Privacy
T
Tor Project blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
N
News and Events Feed by Topic
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
Google Online Security Blog
Google Online Security Blog
T
The Blog of Author Tim Ferriss
Forbes - Security
Forbes - Security
Security Archives - TechRepublic
Security Archives - TechRepublic
Martin Fowler
Martin Fowler
Vercel News
Vercel News
H
Heimdal Security Blog
P
Proofpoint News Feed
H
Help Net Security
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理

博客园 - Ant

ASP.NET Core 项目简单实现身份验证及鉴权 IIS调试ASP.NET Core项目 配置GitHub的SSH key Visual Studio连接Oracle数据库 Visual Studio Code 如何将新项目发布到GIT服务器 Xamarin踩坑经历 Abp项目中的领域模型实体类访问仓储的方法 在Abp中集成Swagger UI功能 发布以NLog作为日记工具的ASP.NET站点到IIS注意事项 Android Studio 简介及导入 jar 包和第三方开源库方[转] 解决jquery-ui-autocomplete选择列表被Bootstrap模态窗遮挡的问题 ORACLE存储过程创建失败,如何查看其原因 EF6配合MySQL或MSSQL(CodeFirst模式)配置指引 火狐通行证升级为Firefox Sync后,如何在多设备间同步书签等信息 (原创)通用查询实现方案(可用于DDD)[附源码] -- 设计思路 (原创)通用查询实现方案(可用于DDD)[附源码] -- 简介 利用Lambda获取属性名称 Entity Framework 6.0 源码解读笔记(一) [转]Sql server2005中如何格式化时间日期
使用iconfont图标
Ant · 2018-12-20 · via 博客园 - Ant

iconfont.cn基本使用

  • 登录iconfont.cn网站,直接使用github账号即可登录

  • 输入关键字搜索需要的图标,然后在需要的图标上点击'添加入库'

  • 点击网站右上角的购物车图标,查看当前已入库的图标

  • 点击下方的[添加至项目]按钮,选择已存在的项目或即时新建一个项目,然后确定

  • 点击顶部导航菜单的[图标管理]\[我的项目],选择一个项目可查看项目内现有的图标

  • 图标列表的上方有几个按钮,最左边的按钮可以选择以Unicode/Font class/Symbol等方式显示

  • 鼠标指向任意图标,可以执行复制代码等相关操作

  • 在Font class/Symbol模式中,图标代码一般为"icon-{图标名}",但是如果同时加入了多个同名的图标,那么后面加入的同名图标代码会以别的规则产生,为了方便在网页中使用,此时最好用鼠标指向该图标,编辑图标,指定一个合适的新代码(留意:不必输入icon-)。

以在线链接方式使用iconfont图标

在HTML文件中

  1. 登录iconfont网站,选择相应项目,切换到Font class模式,复制在线链接URL
  2. 在html文件中添加link标签,引用上一步复制的url(别忘在前面加上"http:"),在需要显示iconfont图标的地方写上<i class="iconfont icon-{图标名}"></i>即可。
    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="utf-8" />
      <title>iconfont example</title>
      <!--当在iconfont项目中添加/编辑/删除图标后,必须更新在线链接URL-->
      <link rel="stylesheet" href="http://at.alicdn.com/t/font_976353_dqgg2ot7ivl.css">
    </head>
    <body>
      <h1>IconFont 图标</h1>
      <p><i class="iconfont icon-verify" style="color:red;"></i>icon-verify</p>
      <p><i class="iconfont icon-verify" style="color: 'rgba(0,0,0,.25)'"></i>icon-verify</p>
    </body>
    </html>
    

在使用antd组件的项目中

3.9.0版本之后的antd组件要使用iconfont中的图标非常简单方便

  1. 登录iconfont网站,选择相应的项目,切换到Symbol模式,点击[查看在线链接]按钮,复制该链接路径

  2. 在需要使用iconfont图标的组件内,添加以下代码(scriptUrl值为第1步复制的URL)。

    const MyIcon = Icon.createFromIconfontCN({
      scriptUrl: '//at.alicdn.com/t/font_xxxx.js', // 在iconfont.cn上生成
    });
    

    注意:当添加/编辑/删除图标后,必须更新在线链接URL,然后将scriptUrl替换为新url

  3. 然后在需要添加图标的地方,添加与下面类似的代码即可:
    <MyIcon type="icon-{图标名}"/>
    type属性的值可直接通过在iconfont网站鼠标指向图标,然后复制代码获得。

以离线方式使用iconfont图标

待写...