html - 如何用Bootstrap实现流体-固定-流体三列布局?

标签 html css twitter-bootstrap multiple-columns

在一个元素中,我需要实现一个 3 列布局,中间有一个固定大小的列,另外两个列的宽度可变(每个 min = 100pxmax =/100% - 500px)/2):

3-columns-layput

(如何)这可以在使用 Twitter Bootstrap 上实现吗?

最佳答案

Bootstrap 似乎没有提供工具来实现这种混合的固定流体布局。必须使用这样的解决方法(找到 here ,另请参阅 http://jsfiddle.net/kizu/UUzE9/ ):

CSS

#main {
    min-width: 500px;
    padding: 0 500px 0 0;
    white-space: nowrap;
    overflow: hidden;
}

.main-column {
    position: relative;
    display: inline-block;
    vertical-align: top;
}

#main-column-left {
    width: 50%;
    background: #00FFB4;
}
#main-column-middle {
    width: 500px;
    background: #434343;
}
#main-column-right {
    width: 50%;
    background: #FF9000;
}

.content {
    white-space: normal;
}

HTML

<div id="main">
    <div class="main-column" id="main-column-left"><div class="content">
        Lorem ipsum dolor sit amet...
    </div></div>
    <div class="main-column" id="main-column-middle"><div class="content">
        Lorem ipsum dolor sit amet...
    </div></div>
    <div class="main-column" id="main-column-right"><div class="content">
        Lorem ipsum dolor sit amet...
    </div></div>
</div>

但这不是解决方案。因此,如果有人知道 Bootstrap 符合方式,请随时发布。

关于html - 如何用Bootstrap实现流体-固定-流体三列布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29399363/

相关文章:

jquery - 图像 src 不会在悬停时改变 - jQuery

html - 使用 CSS,我无法使我的 div 表格居中于屏幕中间

html - 保持网页的基本布局相同

html - 将自定义 Bootstrap 工具提示气球与轮廓对齐

javascript - 带有 colspan 的 html 表格 - 相邻单元格问题

html - 如何在我的案例中构建模态

css - 一排 Bootstrap 类媒体

java - 当我有 .html 和 .css 文件时如何检查文本的 Java 颜色?

CSS :after pseudo element not showing up on <img>?

html - Bootstrap 不均匀列顺序