我该如何在输入框中使用Font Awesome中包含的搜索图标?我的网站有一个搜索功能(基于PHPmotion),我想将其用于搜索。
以下是代码:
以下是代码:
<div id="search-bar">
<form method="get" action="search.php" autocomplete="off" name="form_search">
<input type="hidden" name="type" value="videos" />
<input autocomplete="on" id="keyword" name="keyword" value="Search Videos" onclick="clickclear(this,
'Search Videos')" onblur="clickrecall(this,'Search Videos')" style="font-family: verdana; font-weight:bold;
font-size: 10pt; height: 28px; width:186px; color: #000000; padding-left: 2px; float:left; border: 1px solid black; background-color:
#ffffff" />
<input type="image" src="http://viddir.com/themes/default/images/search.jpg" height="30" width="30" border="0" style="float:right;"/>
<div id="searchBoxSuggestions"></div>
</form>
</div>
:before
,因此无法与input
或img
标签一起使用...但是有一个简单的解决方案-即将FontAwesome作为常规字体使用...请参见我上面更新的解决方案。希望我能赢回您的投票;-) - Martin Turjak$(“input.search”).val(“\ uf002”);
- Jamie Chong