Allign divs浮动左边

时间:2018-04-26 11:30:17

标签: html css asp.net

我在@class = "form-control-inline"中的asp.net中有代码示例:

.form-control-inline {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 50%;
}

和{{1}}

的css
{{1}}

我不知道为什么来自最后一个div的文本框分为两行。首先是在第三行,但在第二列(应该在第一列),因为它第二列移到第四行。

https://doc.akka.io/docs/akka/current/fault-tolerance.html#creating-a-supervisor-strategy

1 个答案:

答案 0 :(得分:2)

你可以使用下面的html结构来解决你的问题



<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>

<div class="container">

<div class="row">
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
</div>
<div class="row">
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
</div>
<div class="row">
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
</div>
<div class="row">
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
  <div class="col-md-6 col-xs-6">
    <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control">
    </div>
  </div>
</div>

</div>
&#13;
&#13;
&#13;