如何在搜索表单中插入fa-fa图标

时间:2017-10-13 00:20:47

标签: html font-awesome

我需要一些搜索表单图标的帮助。按钮标记类<i class="fa fa-search"></i></button>无效:

&#13;
&#13;
<form role="search" method="get" class="search-form" action="<?php echo home_url(); ?>" onsubmit="check_search();return false;">
  <label>
    <input type="search" class="searchfieldz" placeholder="Search anything " value="" name="s" title="Search for:" autocomplete="off">
  </label>
  <button type="submit" class="searchButton">
    <i class="fa fa-search"></i>
  </button>
</form>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
<form role="search" method="get" class="search-form" action="<?php echo home_url(); ?>" onsubmit="check_search();return false;">
  <label>
    <input type="search" class="searchfieldz" placeholder="Search anything " value="" name="s" title="Search for:" autocomplete="off">
  </label>
  <button type="submit" class="searchButton">
    <i class="fa fa-search"></i>
  </button>
</form>

尝试添加

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
相关问题