获得带有字体真棒的后退图标

时间:2017-12-19 17:05:11

标签: html css font-awesome

我不断获得后备图标" fl"虽然我根据自己的研究做了一切:

 <div class="propertySearch">
    <i class="fa fa-search"></i>
    <input placeholder="City, Zip or Street..." type="text">
 </div>


 .propertySearch input { text-indent: 32px;}
 .propertySearch .fa-search { 
 position: absolute;
 top: 10px;
 left: 10px;
 color: black;
 font-size: 30px;
 }

enter image description here

2 个答案:

答案 0 :(得分:1)

您缺少导入font-awesome

的css文件

.propertySearch input {
  text-indent: 32px;
}

.propertySearch .fa-search {
  position: absolute;
  top: 10px;
  left: 10px;
  color: black;
  font-size: 30px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="propertySearch">
  <i class="fa fa-search"></i>
  <input placeholder="City, Zip or Street..." type="text">
</div>

答案 1 :(得分:1)

你能说明你如何导入css文件吗?

应该是:<link href="path/to/yourfile/font-awesome.min.css" rel="stylesheet">