昨天在 Catsxp 论坛发现图标是方框,就打开开发者工具查看,却发现图标是这样的结构:
<i class="fa fa-bars fa-5x">
::before
</i>
before的内容是一个类似于unicode的东西:
:before {
content: "\f015";
}
查了半天才知道这是FontAwesome字体图标库。
摸索了半天才发现,要字体和CSS同时使用才能生效!
<html>
<title>Font Awesome</title>
<head>
<link rel="stylesheet" href="font-awesome.min.css">
<style>
@font-face { font-family:fontawesome; src:url(fontawesome-webfont.woff2); }
a { text-decoration:none; }
i { color:gray; }
.fa-camera { color:black; }
.fa-ban { color:crimson; }
</style>
</head>
<body>
<p><a href="https://webproxy.poorya-velaei-d67.workers.dev/https://fontawesome.dashgame.com" target="_blank">dashgame</a></p>
<i class="fa fa-bars fa-

3067

被折叠的 条评论
为什么被折叠?



