【问题标题】:Twitter Bootstrap nested formTwitter Bootstrap 嵌套表单
【发布时间】:2013-06-18 23:30:54
【问题描述】:

我刚开始使用 Twitter Bootstrap,但不知道如何做到这一点。我想创建一个具有以下布局的表单:

+---------+ +---------------------------+
| input 1 | |                           |
+---------+ |                           |
+---------+ |                           |
| input 2 | |      textarea             |
+---------+ |                           |
+---------+ |                           |
| input 3 | |                           |
+---------+ +---------------------------+

我可以找到一些关于如何在网格系统中水平嵌套控件的示例(例如 this),但对于控件的垂直嵌套,我找不到任何东西。

是否可以在不使用表格的情况下创建这样的布局?

【问题讨论】:

    标签: html forms twitter-bootstrap


    【解决方案1】:

    只需将 3 包裹在 <div class="span2">

    还有<div class="span5">中的textarea

    或者任何比例,都会带来你想要的结果......

    像这样……

    <div class="row-fluid span12">
      <div class='span2'>
           <div control-group....>
           <input...> 
           <input...>
           <input...>
           </div>
     </div>
     <div class="span5">
          <textarea></textarea>
     </div>
    </div>
    

    【讨论】:

      猜你喜欢
      • 2012-09-24
      • 1970-01-01
      • 2015-10-28
      • 2012-05-05
      • 1970-01-01
      • 2015-01-23
      • 2012-10-05
      • 2013-03-23
      • 2023-03-03
      相关资源
      最近更新 更多