• 技术文章 >web前端 >Bootstrap教程

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

    (*-*)浩(*-*)浩2019-07-19 09:27:55原创2359

    在制作表单时,不免要做表单验证。同样也需要提供验证状态样式,在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>

    效果图:

    byz.jpg

    更多Bootstrap相关技术文章,请访问Bootstrap教程栏目进行学习!

    以上就是bootstrap中验证提示状态的类有什么的详细内容,更多请关注php中文网其它相关文章!

    声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
    专题推荐:bootstrap
    上一篇:bootstrap怎么把div变成一个圆 下一篇:自己动手写 PHP MVC 框架(40节精讲/巨细/新人进阶必看)

    相关文章推荐

    • bootstrap学之前要会什么• bootstrap基本结构有哪些• bootstrap收费吗• rocketbootstrap是什么
    1/1

    PHP中文网