Bootstrap COL不工作?

时间:2018-03-13 16:02:24

标签: html css twitter-bootstrap

一切OK:http://prntscr.com/iqo8f7

当我缩小宽度时:http://prntscr.com/iqo8nj

右边的我的按钮没有响应。如果宽度很大就没关系,否则它似乎没有正确调整大小。

知道为什么吗?

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<div class="row">
  <div class="col-sm-11">
    <h5 class="inline" style="vertical-align: sub"> Status: </h5>
    <span class="label label-warning label-lg-status">In Progress</span>
    <hr>
  </div>
  <div class="col-sm-1">
    <button class="btn btn-danger deleteEnvironment" name="ENVU"> Delete</button>
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

主要问题来自所需的引导列设置。如果您按照文档操作,则必须将所有<div class="row">设置为<div class="container"><div class="container-fluid">

所以,如果你做得好,它运作良好:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<div class="container-fluid">
    <div class="row">
      <div class="col-sm-11">
        <h5 class="inline" style="vertical-align: sub"> Status: </h5>
        <span class="label label-warning label-lg-status">In Progress</span>
        <hr>
      </div>
      <div class="col-sm-1">
        <button class="btn btn-danger deleteEnvironment" name="ENVU"> Delete</button>
      </div>
    </div>
</div>