2017-10-13 95 views
1

我需要一個搜索表單圖標的幫助。按鈕標籤類<i class="fa fa-search"></i></button>不起作用:如何將fa-fa圖標插入搜索表格

<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>

+0

你能成爲一個更具體一點什麼會出錯? –

+0

'fa-search'來自FontAwesome。你記得包括'FontAwesome'參考嗎? –

回答

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"/> 
+0

很快,非常感謝! – Reivax