bootstrap的表单form
2024-09-06 14:26:52
(1)默认表单
<form>
<div class="form-group">
<label class="control-label" for=""></label>
<input class="form-control">
<span class="help-block"></span>
</div>
</form>
<h1>默认表单</h1>
<form action="#">
<div class="form-group">
<label for="uname" class="control-label">用户名</label>
<input type="text" id="uname" class="form-control">
<span class="help-block">字母下划线3-8位</span>
</div>
<div class="form-group">
<label for="upwd" class="control-label">密码</label>
<input type="password" id="upwd" class="form-control">
<span class="help-block">密码为6-8位</span>
</div>
<div class="form-group">
<div class="checkbox">
<label><input type="checkbox">七天免密登陆</label>
</div>
</div>
<div class="form-group">
<input type="button" id="login" value="登录" class="btn btn-success">
<input type="button" id="logout" value="取消" class="btn btn-danger">
</div>
</form>
(2)行内表单
<form class="form-inline">
<div class="form-group">
<label class="sr-only"></label>
<input class="form-control">
</div>
</form>
<h1>行内表单</h1>
<h3> Screen Reader Only sr-only</h3>
<form action="#" class="form-inline">
<div class="form-group">
<label for="uname1" class="sr-only"> 用户名</label>
<input class="form-control" type="text" placeholder="请输入用户名" id="uname1">
</div>
<div class="form-group">
<lable for="upwd1" class="sr-only">密码</lable>
<input class="form-control" type="password" placeholder="请输入密码" id="upwd1">
</div>
<div class="form-group"><input type="button" value="登陆" class="btn btn-success"></div>
</form>
(3)水平表单
水平表单=表单+栅格系统(变种)
<form class=" form-horizontal ">
<div class="form-group">
<div class="col-*-*">
<label class="sr-only"></label>
</div>
<div class="col-*-*">
<input class="form-control">
</div>
</div>
</form>
<h1>形式3:水平表单</h1>
<p>水平表单=表单+栅格系统</p>
<form action="#" class="form-horizontal"> <!--等价于div.container-->
<div class="form-group"><!--div.row-->
<div class="col-sm-1"><label for="uname3" class="control-label">用户名</label></div>
<div class="col-sm-3"> <input type="text" class="form-control" id="uname3"></div>
<div class="col-sm-5"> <span class="help-block">字母数字,,,,,</span></div>
</div>
<div class="form-group"><!--div.row-->
<div class="col-sm-1"><label for="upwd2" class="control-label">密码</label></div>
<div class="col-sm-3"> <input type="text" class="form-control" id="upwd2"></div>
<div class="col-sm-5"> <span class="help-block">密码位数,,,,,</span></div>
</div>
<div class="form-group"><!--div.row-->
<div class="col-sm-1"> <input type="button" class="btn btn-success" value="登陆"></div>
<div class="col-sm-1"> <input type="button" class="btn btn-danger" value="取消"></div>
</div>
最新文章
- 从零开始编写自己的C#框架(3)——开发规范
- Unity3D 装备系统学习Inventory Pro 2.1.2 基础篇
- 几个linux终端的有趣玩法
- hdu Wooden Sticks
- Oracle学习之集合运算
- jquery自动焦点图
- struts2的<;constant/>;标签使用
- java 时间格式化(2016.04.12 12:32:55)
- Tomcat配置虚拟路径访问容器外的硬盘资源
- App阅读pdf和扫描二维码功能
- POJ3094 Quicksum
- Linux中安装绿色软件的方法
- mybatis 返回类型为 java.lang.String 接收为null的情景
- SpringBoot简介、特点
- 001.NFS简介
- Sqlite 常用函数推荐
- 001-spring cache 简介
- 2018-2019-2 网络对抗技术 20165332 Exp1 PC平台逆向破解
- Android移动客户端性能测试浅谈——电量
- 【BZOJ 3672】 3672: [Noi2014]购票 (CDQ分治+点分治+斜率优化)**
热门文章
- 获取SpringCloud gateway响应的response的值,记录踩坑
- 大数据安全利器ranger 编译安装
- luoguP4343自动刷题机(二分标准题)
- C++中的异常处理(中)
- vue阻止事件冒泡和默认事件
- day7_面向对象特性
- zz自动驾驶中轨迹规划的探索和挑战
- luoguP4069 [SDOI2016]游戏
- 数据仓库001 - 复习Linux shell命令 - pwd mkdir mv tail -f xxx.log 和 ail -F xxx.log
- torch_12_BigGAN全文解读