【发布时间】:2014-04-20 16:55:51
【问题描述】:
您好,我是使用引导程序的新手,我不太擅长在引导程序中处理响应式图像。
这是我的问题。
我在 992px 上有这样的图像结果格式:
但是当我将屏幕宽度更改为较小的媒体(例如:520 像素)时,图像会对齐,其中没有间隙。
变成这个样子。
我想要这样的,里面有填充(间隙)。
这是我的 HTML 代码:
<!--two columes 3/1-->
<div id="first" class="row">
<div class="col-md-8"><img src="http://placehold.it/640x450" class="img-responsive"></div>
<div class="col-md-4"><img src="http://placehold.it/300x450" class="img-responsive"></div>
</div>
<div id="clean">
<!--two columes 3/1-->
<div id="second" class="row">
<div class="col-md-8">
<img src="http://placehold.it/640x100" class="img-responsive">
<br>
<br>
<img src="http://placehold.it/640x330" class="img-responsive"></div>
<div class="col-md-4"><img src="http://placehold.it/300x470" class="img-responsive"></div>
</div>
<!--two columes half half-->
<div class="row" id="third">
<div class="col-md-6"><img src="http://placehold.it/470x470" class="img-responsive"></div>
<div class="col-md-6"><img src="http://placehold.it/470x470" class="img-responsive"></div>
</div>
<!--four columes-->
<div class="row" id="forth">
<div class="col-xs-6 col-sm-3"><img src="http://placehold.it/250x250" class="img-responsive"></div>
<div class="col-xs-6 col-sm-3"><img src="http://placehold.it/250x250" class="img-responsive"></div>
<!-- Add the extra clearfix for only the required viewport -->
<div class="clearfix visible-xs"></div>
<div class="col-xs-6 col-sm-3"><img src="http://placehold.it/250x250" class="img-responsive"></div>
<div class="col-xs-6 col-sm-3"><img src="http://placehold.it/250x250" class="img-responsive"></div>
</div>
这里是 CSS:
#first
{
padding:20px;
}
#second
{
padding:20px;
}
#third
{
padding:20px;
}
#forth
{
padding:20px;
}
【问题讨论】:
标签: html css twitter-bootstrap twitter-bootstrap-3