画面幅が変わった際、カラムを表示したり消したりする Bootstrap

<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>

<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
#header {
    background-color: blue;
    height: 100px;
}
.row {
    background-color: gray;
    height: 300px;
}
.side {
    background-color: green;
    height: 50px;
    margin: 10px 0;
}
.main {
    background-color: pink;
    height: 50px;
    margin: 10px 0;
}

.sub-main {
    background-color: yellow;
    height: 50px;
    margin: 10px 0;
}

</style>

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
    <div id="header" class="container">header</div>
    </div>
    <div class="container">
        <div class="row">
            <div class="col-sm-3 col-xs-2 side">1</div>
            <div class="col-sm-9 col-xs-5 main">2</div>
            <div class="col-xs-5 sub-main visible-xs">3</div>
        </div>
    </div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>

画面幅が小さくなる(smxs)と、submainクラスの要素が表示されます。

f:id:hrt0kmt:20141018104410p:plain

f:id:hrt0kmt:20141018104422p:plain