引导。有人可以解释为什么我在我的图像上方和下方填充?

时间:2015-11-11 15:37:36

标签: html css twitter-bootstrap

图像位于jumbotron内部,而不是样式表中的背景图像。这是我的HTML代码。

<div class="jumbotron"> 
    <img class="img-responsive" src="images/image.jpg" width="100%" height="100%"> 
</div>

这是我的样式表:

.jumbotron {
  margin-bottom: 0;
}

enter image description here

1 个答案:

答案 0 :(得分:2)

Bootstrap将以下样式应用于'jumbotron'元素。您需要在自己的自定义样式表中覆盖它。

acc += segment.to_i * (60 ** i)

.jumbotron {
  padding: 30px 15px;
  margin-bottom: 30px;
  color: inherit;
  background-color: #eee;
}