bootstrap 列表 表格 表单 复选 单选 多选 输入框组

一、列表 ul li

二、表格 table  (http://www.runoob.com/bootstrap/bootstrap-tables.html)

1. 基本表格 <table class="table">

2. 响应式表格 <div class="table respoinsive"><talbe >
单独设立标题样式 标头样式

 三、表单

第一种:常规样式(垂直)
<form role="form">
<!-- form-group 设置一组,所有的文本框input=text,textarea,select 设置form-countrol-->
<div class="form-group"> <label for="name">名称</label> <input type="text" class="form-control" id="name" placeholder="请输入名称"> </div>
<div class="form-group"> <label for="inputfile">文件输入</label> <input type="file" id="inputfile"> //文本框只需要设置input的类型type=“file” <p class="help-block">这里是块级帮助文本的实例。</p> //帮助说明的样式,文字颜色浅灰色 </div> </form>

备注:一行整合在一起:  <span class="input-group-addon">$</span>

第二种:内联表单(左对齐) <form class="form-horizontal" role="form">

第三种:Bootstrap 支持最常见的表单控件,主要是 input、textarea、checkbox、radio 和 select
Bootstrap 提供了对所有原生的 HTML5 的 input 类型的支持,包括:text、password、datetime、datetime-local、date、month、time、week、number、email、url、
search、tel
color。适当的 type 声明是必需的,这样才能让 input 获得完整的样式。
文本框: <textarea class="form-control" rows="3"></textarea>
选择框: 复选checkbox 单选radio
<label for="name">默认的复选框和单选按钮的实例</label> <div class="checkbox"> <label><input type="checkbox" value="">选项 1</label> </div> <div class
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个包含单选框,复选框,输入框,下拉菜单和提交按钮的 Bootshape 表单的示例代码: ```html <form> <div class="form-group"> <label for="nameInput">Name</label> <input type="text" class="form-control" id="nameInput" placeholder="Enter your name"> </div> <div class="form-group"> <label for="emailInput">Email address</label> <input type="email" class="form-control" id="emailInput" placeholder="Enter your email address"> </div> <div class="form-group"> <label for="genderInput">Gender</label> <div class="form-check"> <input class="form-check-input" type="radio" name="genderInput" id="maleRadio" value="male"> <label class="form-check-label" for="maleRadio"> Male </label> </div> <div class="form-check"> <input class="form-check-input" type="radio" name="genderInput" id="femaleRadio" value="female"> <label class="form-check-label" for="femaleRadio"> Female </label> </div> </div> <div class="form-group"> <label for="interestsInput">Interests</label> <div class="form-check"> <input class="form-check-input" type="checkbox" value="music" id="musicCheckbox"> <label class="form-check-label" for="musicCheckbox"> Music </label> </div> <div class="form-check"> <input class="form-check-input" type="checkbox" value="sports" id="sportsCheckbox"> <label class="form-check-label" for="sportsCheckbox"> Sports </label> </div> <div class="form-check"> <input class="form-check-input" type="checkbox" value="movies" id="moviesCheckbox"> <label class="form-check-label" for="moviesCheckbox"> Movies </label> </div> </div> <div class="form-group"> <label for="citySelect">City</label> <select class="form-control" id="citySelect"> <option>New York</option> <option>Los Angeles</option> <option>Chicago</option> <option>Houston</option> <option>Philadelphia</option> </select> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> ``` 这个表单包括五个输入字段:姓名,电子邮件地址,性别(单选框),兴趣爱好(复选框),城市(下拉菜单)。每个输入字段都有一个相应的标签和占位符文本。表单中还有一个提交按钮。这个表单的样式使用了 Bootstrap 的默认样式。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值