码迷,mamicode.com
首页 > 其他好文 > 详细

Bootstrap系列 -- 14. 表单控件输入框input

时间:2015-06-24 22:13:26      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:

 

  

  每一个表单都是由表单控件组成。离开了控件,表单就失去了意义。接下来的我们简单的来了解Bootstrap框架中表单控件的相关知识。

  单行输入框,常见的文本输入框,也就是inputtype属性值为text。在Bootstrap中使用input时也必须添加type类型,如果没有指定type类型,将无法得到正确的样式,因为Bootstrap框架都是通过input[type=“?”](其中?号代表type类型,比如说text类型,对应的是input[type=“text”])的形式来定义样式的。

<form role="form">
  <div class="form-group">
    <input type="email" class="form-control" placeholder="Enter email">
    
  </div>
  
  <div class="form-group">
    <input type="text" class="form-control" placeholder="请输入用户名">
    
  </div>
</form>   

 

Bootstrap系列 -- 14. 表单控件输入框input

标签:

原文地址:http://www.cnblogs.com/qingyuan/p/4598625.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!