html - Bootstrap 基本网格布局冲突

标签 html css twitter-bootstrap

我正在处理的网站的一部分采用两栏设计。我希望这适用于所有屏幕尺寸,xs 设备除外。在 xs 设备上,我想要单列设计。我觉得下面的方法是不正确的,因为在所有情况下 col-span 总加起来应该是 12,而目前 xs 屏幕不是这样。另一方面,如果我更改它 col-xs-6,它会强制在超小屏幕上进行双列设计,而我正试图避免这种情况。

在超小屏幕上完成单列设计,同时在所有其他屏幕尺寸上保持双列设计的正确方法是什么?

这是我尝试过的:

<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="ac-wrapper">
                <div class="ac-h">
                    Heading 2
                </div>
                <p class="ac-p">
                text here text here text here text here text here text here text here text her text here text here text here text here text here text here text here text here text here text here 
                </p>
            </div>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <div class="ac-wrapper">
                <div class="ac-h">
                    Heading 123
                </div>
                <p class="ac-p">
                    text here text here text here text here text here text here text her text here text here text here text here text here text here text here text here text her text here text here text here text here 
                </p>
            </div>
        </div>
    </div>
</div>

最佳答案

一种解决方案是使用 http://getbootstrap.com/css/#responsive-utilities 切换内容可见性

关于html - Bootstrap 基本网格布局冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26856080/

相关文章:

javascript - getElementById Javascript 不工作?

javascript - 如何连接两个变量作为我的 ng-src?

html - CSS 显示 :table

jquery - Coda Slider 的 CSS 溢出

css - Div表交替行4个单元格和1个单元格

javascript - Bootstrap slider 冲突

html - CSS - 强制按钮连续

html - 如何将 Web 应用程序从 HTML 切换到 Markdown?

html - 如何创建一个以 Bootstrap 导航栏为中心的 div?

css - Bootstrap 页面滚动事件颜色不会改变