博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【HTML5/CSS/JS】A list of Font Awesome icons and their CSS content values(一)
阅读量:4196 次
发布时间:2019-05-26

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

做网站的时候,看到一个font Awesome字体,里面包含着常用的图片,可以直接在网站上使用

 is a web font containing all the icons from the Twitter Bootstrap framework, and now many more. Whilst the implementation in Bootstrap is designed to be used with the<i> element (Bootstrap v2), you may find yourself wanting to use these icons on other elements. To do so, you'll need to use the following CSS on the desired element, and then substitute in the content value for the relevant icon.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.element {
    
position
relative
;
}
 
/*replace the content value with the
corresponding value from the list below*/
 
.element:before {
    
content
"\f000"
;
    
font-family
: FontAwesome;
    
font-style
normal
;
    
font-weight
normal
;
    
text-decoration
: inherit;
/*--adjust as necessary--*/
    
color
#000
;
    
font-size
18px
;
    
padding-right
0.5em
;
    
position
absolute
;
    
top
10px
;
    
left
0
;
}

Note: it is not possible to use :before or :after pseudo content on <input> elements, however if you instead use <button>Label</button>, it will work as desired.

下面是一个使用了FontAwesome字体的网站角标部分

网站角标的网站:

下载链接:

原文链接:

你可能感兴趣的文章
【一天一道LeetCode】#47. Permutations II
查看>>
【一天一道LeetCode】#48. Rotate Image
查看>>
【一天一道LeetCode】#56. Merge Intervals
查看>>
【一天一道LeetCode】#57. Insert Interval
查看>>
【一天一道LeetCode】#58. Length of Last Word
查看>>
【一天一道LeetCode】#59. Spiral Matrix II
查看>>
【一天一道LeetCode】#30. Substring with Concatenation of All Words
查看>>
【一天一道LeetCode】#60. Permutation Sequence.
查看>>
【一天一道LeetCode】#62. Unique Paths
查看>>
【一天一道LeetCode】#61. Rotate List
查看>>
【一天一道LeetCode】#63. Unique Paths II
查看>>
【一天一道LeetCode】#36. Valid Sudoku
查看>>
【一天一道LeetCode】#75. Sort Colors
查看>>
【一天一道LeetCode】#76. Minimum Window Substring
查看>>
【计算机网络 第五版】阅读笔记之一:概述
查看>>
【计算机网络 第五版】阅读笔记之二:物理层
查看>>
【计算机网络 第五版】阅读笔记之三:数据链路层
查看>>
【计算机网络 第五版】阅读笔记之四:网络层
查看>>
【计算机网络 第五版】阅读笔记之五:运输层
查看>>
【一天一道LeetCode】#77. Combinations
查看>>