我如何使用“Font Awesome”中的圖示作為“After or Before”的偽元素
我嘗試了很多,但沒有用
uj5u.com熱心網友回復:
您可以使用 Font Awesome Cheat Sheet 添加圖示。https://fontawesome.com/v4.7/cheatsheet/
這是一個如何做到這一點的示例。
.icon
{
content: '\'
font: normal normal normal 14px/1 FontAwesome;
font-size: 16px;
}
uj5u.com熱心網友回復:
a:before {
font-family: FontAwesome;
content: "\f095";
display: inline-block;
padding-right: 3px;
vertical-align: middle;
}
<!DOCTYPE html>
<html>
<head>
<title>Font Awesome Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<a href="#">Call Us</a>
</body>
</html>
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/337333.html
標籤:css
