搜索框内的搜索图标 [英] search icon inside search box

查看:305
本文介绍了搜索框内的搜索图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我现在是这样的:

但我想添加icon-search

But I want to include icon-search ICON SEARCH inside the textbox on the left side.

这是我的代码:

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

那么任何想法如何实现呢?感谢。

So any ideas how to achieve this? Thanks.

推荐答案

检查此小提琴

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

正如你所看到的,还有其他图标也显示。您必须为您的文本框使用单独的搜索图片。

As you can see there are other icons also showing. You have to use separate "search image" for your textbox.

这篇关于搜索框内的搜索图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆