任何人都可以使用媒體查詢來幫助使此列表佈局響應不同的屏幕尺寸嗎?目前,它是根據屏幕大小調整的流體佈局。我需要關於使用媒體查詢的建議。使用媒體查詢製作圖像響應
我原來的代碼是在https://jsfiddle.net/7qsp1k0o/2/
.item.list-group-item {
float: none;
width: 100%;
background-color: #fff;
margin-bottom: 10px;
}
.item.list-group-item .list-group-image {
margin-right: 10px;
}
.item.list-group-item .thumbnail {
margin-bottom: 0px;
}
.item.list-group-item .caption {
padding: 9px 9px 0px 9px;
}
.item.list-group-item:before,
.item.list-group-item:after {
display: table;
content: " ";
}
.item.list-group-item img {
float: left;
}
.item.list-group-item:after {
clear: both;
}
.list-group-item-text {
margin: 0 0 11px;
}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div id="products" class="row list-group ">
<div class="item col-xs-4 col-lg-4 list-group-item">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400X250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Activity title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
Charge : $21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="#">Apply Now</a>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-4 col-lg-4 list-group-item">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400X250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Activity title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
Charge : $21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="#">Apply Now</a>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-4 col-lg-4 list-group-item">
<div class="thumbnail">
<img class="group list-group-image" src="http://placehold.it/400X250/000/fff" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Activity title</h4>
<p class="group inner list-group-item-text">
Product description... Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
Charge : $21.000</p>
</div>
<div class="col-xs-12 col-md-6">
<a class="btn btn-success" href="#">Apply Now</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
編輯:加入想要的結果。 我希望文字不應該在圖像下面流動,而是整個東西(圖像和框)應該縮小以適應屏幕尺寸。
爲什麼使用媒體查詢,因爲它已經與響應引導? – AVI
它是響應式的,但我希望它根據屏幕大小稍微調整一下它的風格。所以它看起來不錯。 – user2816085
它工作正常。你的預期結果是什麼? –