博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用了却报错值没有使用_使用没有
阅读量:2512 次
发布时间:2019-05-11

本文共 1269 字,大约阅读时间需要 4 分钟。

使用了却报错值没有使用

If you've not used glyph icon libraries like before, you're really missing out.  They're incredibly useful, flexible, and are easy to implement via markup.  The normal method for using font awesome is by using an <i> element with an icon-specific CSS class:

如果您以前从未使用过像这样的字形图标库,那您真的会错过了。 它们非常有用,灵活,并且易于通过标记实现。 使用超棒字体的常规方法是将<i>元素与图标特定CSS类一起使用:

This works beautifully in most cases but what if you don't want to inject an <i> tag or simply can't?  If you run into this case, you can still use Font Awesome glyphs!  All you need to do is use the :before pseudo-element of the element you want to use and set its content and font-family:

在大多数情况下,这种方法效果很好,但是如果您不想插入<i>标记或者根本无法插入该标记怎么办? 如果遇到这种情况,您仍然可以使用Font Awesome字形! 您所需要做的就是使用:before想要使用的元素的伪元素,并设置其内容和font-family:

div.github:before {	content: "\f09b";	font-family: FontAwesome;	/* more styling for the icon, including color, font-size, positioning, etc. */}

This is essentially what Font Awesome does for <i> tags so it's only natural that we do so for our custom purpose.  To find the content string for the icon you'd like, just open the font-awesome.css and look up the icon you'd like to use!

从本质上讲,这就是Font Awesome对<i>标签所做的工作,因此出于自定义目的这样做是很自然的。 要找到所需图标的内容字符串,只需打开font-awesome.css并查找您想要使用的图标即可!

翻译自:

使用了却报错值没有使用

转载地址:http://rwpwd.baihongyu.com/

你可能感兴趣的文章
Openssl rand命令
查看>>
HDU2825 Wireless Password 【AC自动机】【状压DP】
查看>>
BZOJ1015: [JSOI2008]星球大战starwar【并查集】【傻逼题】
查看>>
HUT-XXXX Strange display 容斥定理,线性规划
查看>>
mac修改用户名
查看>>
一道关于员工与部门查询的SQL笔试题
查看>>
Canvas基础
查看>>
[Hive - LanguageManual] Alter Table/Partition/Column
查看>>
可持久化数组
查看>>
去除IDEA报黄色/灰色的重复代码的下划波浪线
查看>>
Linux发送qq、网易邮件服务配置
查看>>
几道面试题
查看>>
【转】使用 WebGL 进行 3D 开发,第 1 部分: WebGL 简介
查看>>
js用正则表达式控制价格输入
查看>>
chromium浏览器开发系列第三篇:chromium源码目录结构
查看>>
java开发操作系统内核:由实模式进入保护模式之32位寻址
查看>>
第五讲:单例模式
查看>>
Python编程语言的起源
查看>>
Azure ARMTemplate模板,VM扩展命令
查看>>
使用Masstransit开发基于消息传递的分布式应用
查看>>