bootstrap怎么给input加图标


本文摘自PHP中文网,作者angryTom,侵删。

推荐教程:Bootstrap教程

示例代码

1

2

3

4

5

6

7

8

9

10

11

<div class="input-group">

    <div class="input-icon-group">

        <input type="text" class="form-control fc-clear" />

        <span id="scan" data-role="md" class="md md-center-focus-weak fa-lg input-icon input-icon-md" style="display: inline;">

        </span>

    </div>

    <span class="input-group-btn">

        <button class="btn btn-primary" type="button">

            批号        </button>

    </span>

</div>

效果图:

b11.png

解读:

  1、首先使得他们在一行主要是"input-group"、“input-icon-group”和“input-group-btn”属性起作用

  2、使得input里面的图标在input里面展现的效果主要是“input-icon input-icon-md”起作用,和“display: inline”起作用。

  3、对于input框能够占据整行空隙,而不是宽度很小,起作用的是“form-control”。

  4、对于input框里面输入文字后,不会覆盖图标,起作用的是“fc-clear”。

以上就是bootstrap怎么给input加图标的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

怎么解决bootstrap乱码问题

jquery怎么判断input是否为空

bootstrap是什么时间开源的

bootstrap能开发移动端吗

bootstrap响应式布局图片怎么居中

html如何修改日期样式

为什么使用bootstrap

bootstrap可以更改样式吗

bootstrap置信区间如何求

bootstrap react区别

更多相关阅读请进入《bootstrap》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...