我正在尝试通过CSS显示字体真棒的图标。我发现这篇Use font awesome icon as CSS content帖子解释了如何做。但是,当我自己尝试执行此操作时,无论使用哪种Unicode,我都会在网页上看到以下内容Image。为什么会这样?
HTML
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./style.css">
<script src="https://kit.fontawesome.com/mycode.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="test"></div>
</body>
</html>
CSS
.test::before {
font-family: "Font Awesome 5 Free";
content: "\f14a";
display: inline-block;
padding-right: 3px;
vertical-align: middle;
font-weight: 900;
width: 14px;
height: 14px;
}