bootstrap中有哪些验证提示状态的类

这篇文章主要介绍bootstrap中有哪些验证提示状态的类,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

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

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

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

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

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

<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中有哪些验证提示状态的类”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!