搜索框内的搜索图标

nek*_*ouh 5 html5 css3 twitter-bootstrap

所以我现在所拥有的是:

样品

但我想在左侧的文本框中包含图标搜索ICON SEARCH.

这是我的代码:

<form class="navbar-form pull-left form-search">
    <select>
        <option>Search patient by...</option>
        <option name="fname">Firstname</option>
        <option name="fname">Lastname</option>
        <option name="fname">Last follow up</option>
    </select>
    <div class="input-append">
        <input data-provide="typeahead" data-items="4"  type="text" 
           class="span2 search-query">
        <button class="btn">Search</button>
    </div>
</form>
Run Code Online (Sandbox Code Playgroud)

那么任何想法如何实现这一目标?谢谢.

小智 2

检查这个小提琴

<form class="navbar-form pull-left form-search">
  <div class="input-append">
    <input data-provide="typeahead" data-items="4"  type="text" class="span2 search-query" style="background:url(http://twitter.github.io/bootstrap/assets/img/glyphicons-halflings.png) no-repeat -38px 9px">
    <button class="btn">Search</button>
  </div>
</form>
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,还显示了其他图标。您必须为文本框使用单独的“搜索图像”。