将按钮对齐底部

时间:2016-04-15 12:58:22

标签: twitter-bootstrap twitter-bootstrap-3

我使用表格,标签显示在输入上。 如何将按钮与按钮对齐?

<form role="form">
    <div class="form-group">
      <div class="col-xs-1">
        <label for="searchLodgerNumber">Numéro</label>
        <input type="text" class="form-control" placeholder="Numéro, 2 caractère" name="searchLodgerNumber" id="searchLodgerNumber">
      </div>
      <div class="col-xs-2">
        <label for="searchLodgerLastName">Nom</label>
         <input type="text" class="form-control" placeholder="Nom, min 2 caractère" name="searchLodgerLastName" id="searchLodgerLastName">
      </div>
    </div>
    <div class="input-group-btn">
        <button id="lodgerSearch" type="button"  class="btn btn-default"><i class="glyphicon glyphicon-search"></i></button>
    </div>
  </form>
</form>

我在这里创建了一个演示

只需检查修改后的小提琴 https://jsfiddle.net/6wavvbxx/1/

enter image description here

修改

我搜索以获取enter image description here

1 个答案:

答案 0 :(得分:0)

试试这个,我用按钮重新构建了HTML类:

小提琴:Fiddle

'use strict';
$.ajax({
    url: url,
    method: 'GET',
    beforeSend: function (request, settings) {
        start_time = new Date().getTime();
    },
    success: function (response) {
        let request_time = new Date().getTime() - start_time;
        console.log(request_time);
    },
    error: function (jqXHR) {
        console.log('ERROR! \n %s', JSON.stringify(jqXHR));
    }
]);

自定义CSS:

  <div class="col-xs-1">
     <div class="spacer"></div>
     <button type="submit" class="btn btn-default">
        <i class="glyphicon glyphicon-search"></i>
     </button>
  </div>