简体   繁体   English

在CSS中添加图标

[英]Add an icon in Css

I'm trying to add an icon under div(x) and on top of line but it's not showing in my browser. 我正在尝试在div(x)下并在行顶部添加一个图标,但该图标未在我的浏览器中显示。 What is wrong? 怎么了?

<i class="fa fa-user-circle" aria-hidden="true"></i>
<hr style="margin-left:20px; margin-right:20px; color:#ccc; box-shadow:0px 0px
  10px rgba(0,0,0,0.5);"></hr>

To use the (I assume) font awesome icons, you need to download the fonts library include the library in your html. 要使用(我认为)字体很棒的图标,您需要下载字体库,包括html中的库。

ie-

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

(this is the link to the font awesome CDN from bootstrap. you can (and should) save the library locally and have a local link there instead) (这是从引导程序链接到真棒CDN字体的链接。您可以(并且应该)将库保存在本地,并在其中拥有本地链接)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM