繁体   English   中英

自举col-offset

[英]Bootstrap col-offset

我正在使用col-xs-offset-1在xs屏幕上以块样式布局中的每一列居中。 但是,在大屏幕上,我使用col-lg-offset-3来以行形式显示并在屏幕上居中显示。 通过这样做,好像col-xs-offset-1覆盖了col-lg布局,因此现在大屏幕上的列不再居中(请参阅图片链接)。 是什么原因造成的? 我怎样才能同时拥有呢? 徽章未居中

<div class="container-fluid">
        <div class="row">
            <div class="list-group">
                <div class="col-xs-offset-1 col-xs-10 col-sm-offset-3 col-sm-2 col-md-offset-3 col-md-2 col-lg-offset-3 col-lg-2">
                    <a href="http://hyperurl.co/cplq6c" class="list-group-item" target="_blank">
                        <i class="fa fa-apple fa-2x" aria-hidden="true" style="color: whitesmoke;"></i>itunes
                    </a>
                </div>

                <div class="col-xs-offset-1 col-xs-10 col-sm-2 col-md-2 col-lg-2">
                    <a href="http://hyperurl.co/1qcfl6" class="list-group-item" target="_blank">
                        <i class="fa fa-amazon fa-2x" aria-hidden="true" style="color: #ff9900;"></i>amazon
                    </a>
                </div>

                <div class="col-xs-offset-1 col-xs-10 col-sm-2 col-md-2 col-lg-2">
                    <a href="http://hyperurl.co/mb95g4" class="list-group-item" target="_blank">
                        <i class="fa fa-google fa-2x" aria-hidden="true" style="color: #34a853;"></i>google play
                    </a>
                </div>
            </div>
        </div>
    </div>

Bootstrap偏移量从小到大都适用,因此col-xs-offset-1将影响大于xs的列。 您可以添加col-sm-offset-0以防止偏移量影响较大的列。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM