Bootstrap 3表格 - 2盒

时间:2017-03-23 09:19:35

标签: forms twitter-bootstrap input

我不知道如何解释这个问题,所以我会给你一个屏幕截图。我想为瓶号做到这一点。

What I want to achieve

What I have right now

这是我目前的代码,基本形式:

<table class="table" id="tab_logic">
            <thead>
            <tr>
                <th class="text-left">
                    Nom du vin
                </th>
                <th class="text-left">
                    Millésime
                </th>
                <th class="text-left">
                    Quantité
                </th>
                <th class="text-left">
                    Condionnement
                </th>
            </tr>
            </thead>
            <tbody>
            <tr id='addr0'>
                <td>
                    <input type="text" name='name0' placeholder='Nom du vin' class="form-control"/>
                </td>
                <td>
                    <select class="form-control">
                        <option>Rouge</option>
                        <option>Rosé</option>
                        <option>Blanc</option>
                    </select>
                </td>
                <td>
                    <input type="text" name='mobile0' placeholder='Mobile' class="form-control"/>
                </td>
                <td>
                    <input type="text" name='mobile0' placeholder='OK' class="form-control"/>
                </td>
            </tr>
            <tr id='addr1'></tr>
            </tbody>

谢谢!

1 个答案:

答案 0 :(得分:1)

您需要使用DIV输入组:

  • 输入
  • a span

像这样:

<div class="input-group">
  <input type="text" class="form-control" placeholder="Quantités" aria-describedby="bottle">
  <span class="input-group-addon" id="bottle">Bouteilles</span>
</div>