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

广告:宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取~~~

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相关技术文章,请访问Bootstrap教程栏目进行学习!

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

9543建站博客
一个专注于网站开发、微信开发的技术类纯净博客。
作者头像
admin创始人

肥猫,知名SEO博客站长,14年SEO经验。

上一篇:有关翻译功能的课程推荐10篇
下一篇:easyui和bootstrap的区别

发表评论

关闭广告
关闭广告