窓のサイズを変更すると、それは私ですか、またはcol-xs-12
が非常に早く始まるのですか? https://jsfiddle.net/t0o0capo/基本的なTwitterのブートストラップグリッドのグリッチ
たとえば、モバイルでdivを背景に黒色にしたいのですが、これはデスクトップ上の色です。どうしてこれなの?
/* Latest compiled and minified JavaScript included as External Resource */
/* Latest compiled and minified CSS included as External Resource*/
/* Optional theme */
@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css');
.col-lg-4 {
background:red
}
.col-md-4 {
background:green
}
.col-sm-4 {
background:blue
}
.col-xs-12 {
background:black;
}
body {
margin: 10px;
}
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-2 thumb">
<a class="thumbnail" href="#">
<img class="img-responsive" src="http://placehold.it/400x300" alt="">
</a>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 thumb">
<a class="thumbnail" href="#">
<img class="img-responsive" src="http://placehold.it/400x300" alt="">
</a>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 thumb">
<a class="thumbnail" href="#">
<img class="img-responsive" src="http://placehold.it/400x300" alt="">
</a>
</div>
<hr>
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<p>Copyright © Your Website 2014</p>
</div>
</div>
</footer>
</div>
ありがとうございます。ブートストラップ3のための既存の標準メディアクエリがありますか? – michaelmcgurk
@michaelmcgurkブートストラップは私の知る限り、メディアクエリーのために480,768,992、および1200ピクセルの「最小幅」を使用します。 –