码迷,mamicode.com
首页 > 其他好文 > 详细

bootstrap ch2清除浮动

时间:2016-04-30 18:19:40      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html>
<head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>code2</title>
        <link rel="stylesheet" href="css/bootstrap.min.css"/>
        <script type="application/javascript" src="js/jquery-1.12.3.min.js"></script>
        <script type="application/javascript" src="js/bootstrap.min.js"></script>
        <style>
            div{border:1px solid red}
        </style>
    </head>
    <body>
        <div class="container">
            <div class="row">
                <div class="col-xs-6 col-sm-3">col-xs-6 col-sm-3 1<br/>胡大臣数胡大臣</div>
                <div class="col-xs-6 col-sm-3">col-xs-6 col-sm-3 2</div>
                <div class="clearfix visible-xs"></div>
                <!--清除了3的浮动使得3排在1的下面-->
                <div class="col-xs-6 col-sm-3">col-xs-6 col-sm-3 3</div>
                <div class="col-xs-6 col-sm-3">col-xs-6 col-sm-3 4</div>
            </div>
        </div>
    </body>
</html>

 

bootstrap ch2清除浮动

标签:

原文地址:http://www.cnblogs.com/hduhdc/p/5449064.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!