Ist es mir oder col-xs-12
Start sehr früh beim Ändern der Fenstergröße? https://jsfiddle.net/t0o0capo/Grundlegende Twitter Bootstrap Grid glitch
Zum Beispiel möchte ich meine divs auf Handy Hintergrund schwarz haben, aber es ist diese Farbe am Desktop. Warum ist das?
/* 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>
Danke Cody. Gibt es irgendwelche Standard-Medienabfragen für Bootstrap 3, die ich verwenden sollte? – michaelmcgurk
@michaelmcgurk Bootstrap verwendet, meiner Kenntnis nach, "min-width" 480, 768, 992 und 1200 Pixel für Medienabfragen. –