当前第2页 返回上一页
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <p class= "container" >
<form action= "#" method= "post" class= "form-horizontal" >
<!--form-horizontal让表单初始化-->
<fieldset>
<legend>用户登陆</legend>
<p class= "form-group" >
<label class= "col-xs-3 control-label" >用户名:</label>
<!--借助栅格系统设置label的宽度-->
<p class= "col-xs-9" >
<input type= "text" class= "form-control" name= "name" placeholder= "用户名" >
</p>
<!--用p设置栅格并包裹input-->
</p>
</form>
</p>
<!--注意!把label和input放在同一行在768分辨率一下是有问题的 在md和lg上正常-->
|
小图标的添加
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <p class= "container" >
<form action= "#" method= "post" class= "form-horizontal" >
<!--form-horizontal让表单初始化-->
<fieldset>
<legend>用户登陆</legend>
<p class= "form-group has-feedback has-success" >
<!--在项目的p外包围class加has-feedback-->
<label class= "col-xs-3 control-label" >用户名:</label>
<p class= "col-xs-9" >
<input type= "text" class= "form-control" name= "name" placeholder= "用户名" >
<span class= "glyphicon glyphicon-ok form-control-feedback" aria-hidden= "true" ></span>
<!--在input之下添加一个span 记得加form-c-f-->
</p>
</p>
</form>
</p>
|
一堆按钮组件
1 2 3 4 5 6 7 8 9 10 | <p class= "container" >
<p class= "btn-toolbar" >
<p class= "btn-group" >
<button class= "btn btn-success" ><span class= "glyphicon glyphicon-star" ></span></button>
<button class= "btn btn-info" ><span class= "glyphicon glyphicon-star" ></span></button>
<button class= "btn btn-danger" ><span class= "glyphicon glyphicon-star" ></span></button>
<button class= "btn btn-default" ><span class= "glyphicon glyphicon-star" ></span></button>
</p>
</p>
</p>
|
不要强行去做一个按钮分离 因为这是一组 中间的按钮不是圆角的
搜索框
1 2 3 4 5 6 7 8 9 | <p class= "col-md-4 col-md-offset-2" >
<p class= "input-group input-lg" >
<p class= "input-group-addon" >
<a href= "" ><span class= "glyphicon glyphicon-star" ></span></a>
</p>
<input type= "text" class= "form-control input-xs" >
</p>
</p>
</p>
|
总结:以上所述就是给大家介绍的Bootstarp 基础教程之表单部分的全部内容,希望能对大家的学习有所帮助。
相关推荐:
Bootstrap是什么?Bootstrap的简单介绍
Bootstrap表单布局有哪几种方式?Bootstrap表单布局的创建方法
Bootstrap中文手册
以上就是bootstrap 基础教程之表单部分实例代码的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
bootstrap remote用法是什么
bootstrap layout it怎么使用
bootstrap属于js框架吗
vue.js怎么引入bootstrap
用bootstrap做的网站有哪些
为什么要使用bootstrap
bootstrap被淘汰了么
什么是bootstrap框架
layui如何对表单标签进行校验
浅谈bootstrap响应式图片的实现方法
更多相关阅读请进入《bootstrap》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » bootstrap 基础教程之表单部分实例代码