正确的行属性用于居中框

这个问题在这里已经有了答案:

  • 使用Twitter Bootstrap 3 28答案居中列

  • 另一种方法是使用偏移量...

    <div class="container">
        <div class="row">
            <div class="col-xs-6 col-xs-offset-3"></div>
            <div class="col-xs-3"></div>
        </div>
    </div>
    

    演示:http://codeply.com/go/HV3yrjxKtB


    从文档中获取:将类以.row为中心添加到行,以.col为中心添加到列。

    <div class="container">
        <div class="row row-centered">
            <div class="col-xs-6 col-centered"></div>
            <div class="col-xs-6 col-centered"></div>
            <div class="col-xs-3 col-centered"></div>
            <div class="col-xs-3 col-centered"></div>
            <div class="col-xs-3 col-centered"></div>
        </div>
    </div>
    
    链接地址: http://www.djcxy.com/p/75915.html

    上一篇: Proper row attributes to use for a centered box

    下一篇: Div needs to be centered