bootstrap中验证提示状态的类有什么


本文摘自PHP中文网,作者(*-*)浩,侵删。

在制作表单时,不免要做表单验证。同样也需要提供验证状态样式,在Bootstrap框架中同样提供这几种效果。

1、.has-warning:警告状态(黄色)(推荐学习:Bootstrap视频教程)

2、.has-error:错误状态(红色)

3、.has-success:成功状态(绿色)

使用的时候只需要在form-group容器上对应添加状态类名。

1

2

3

4

5

6

7

8

9

10

11

12

13

14

<form role="form">

<div class="form-group has-success">

  <label class="control-label" for="inputSuccess1">成功状态</label>

  <input type="text" class="form-control" id="inputSuccess1" placeholder="成功状态" >

</div>

<div class="form-group has-warning">

  <label class="control-label" for="inputWarning1">警告状态</label>

  <input type="text" class="form-control" id="inputWarning1" placeholder="警告状态">

</div>

<div class="form-group has-error">

  <label class="control-label" for="inputError1">错误状态</label>

  <input type="text" class="form-control" id="inputError1" placeholder="错误状态">

</div>

</form>

效果图:

阅读剩余部分

相关阅读 >>

bootstrap模态框如何加滚动条

bootstrap适合做电商吗

什么是bootstrap栅格系统的单位

bootstrap有哪些插件

什么是bootstrap以及其作用

bootstrap有什么优势

浅谈bootstrap如何自定义侧边导航栏样式

bootstrap有什么优点

bootstrap怎么在jsp使用方法

如何使用bootstrap制作form表单

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




打赏

取消

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

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

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

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

评论

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