【发布时间】:2018-05-28 18:37:08
【问题描述】:
嗨,我正在尝试在元素之前和之后添加字体真棒图标。但我不知道如何编写它的 css 以及如何获取字体真棒图标链接以将它放在 css 之前的之后。
我已经创建了这样的结构。
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
</head>
<style>
.thish{position:relative; height:150px; width:150px ; background:red; }
.thish::before{position:absolute; content:'tyjthsrgd';right:40%; color:#000; bottom:0; height:30px; width:60px; background:green; z-index:1; }
</style>
<body>
<div class="thish">
</div>
</body>
</html>
【问题讨论】:
-
Font Awesome 5 有 examples about this(尽管您使用的是 v4.7.0)。
-
如果我的回答对你有帮助,请采纳
标签: html css font-awesome