Bootstrap – Dynamic design for phone, tablets, desktops, larger desktops – Part 2

The Bootstrap grid system has four classes: xs (phones), sm (tablets), md (desktops), and lg (larger desktops). These classes can be combinated to create more dynamic and flexible layouts.

<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Bootstrap Example</title>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link rel=”stylesheet” href=”http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css”&gt;
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script&gt;
<script src=”http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js”></script&gt;
</head>
<body>

<div class=”container-fluid”>
<h1>Hello World!</h1>
<p>Resize the browser window to see the effect.</p>
<div class=”row” style=”background-color:lavender;”>
<div class=”col-xs-12 col-md-8″>.col-xs-12 .col-md-8</div>
<div class=”col-xs-6 col-md-4″>.col-xs-6 .col-md-4</div>
</div>
<div class=”row” style=”background-color:lavenderblush;”>
<div class=”col-xs-6 col-md-4″>.col-xs-6 .col-md-4</div>
<div class=”col-xs-6 col-md-4″>.col-xs-6 .col-md-4</div>
<div class=”col-xs-6 col-md-4″>.col-xs-6 .col-md-4</div>
</div>
<div class=”row” style=”background-color:lightcyan;”>
<div class=”col-xs-6″>.col-xs-6</div>
<div class=”col-xs-6″>.col-xs-6</div>
</div>
</div>

</body>
</html>

Advertisements