css - twitter bootstrap 中的双列布局,第一列宽度固定,第二列宽度填充其余空间

标签 css twitter-bootstrap

我正在使用 Twitter Bootstrap,我正在尝试获得标题中描述的布局。

请指教。

最佳答案

你可以尝试这样的事情:

<div class="row-fluid">
 <div class="span12">
  <div class="fixed_width"></div>
  <div class="variable_width"></div>
 </div>
</div>

和 CSS

div.fixed_width {
 width: 300px;
 // or try with: "float:left;" too
}

div.variable_width {
 overflow: hidden;
 // if you use float:left in the other, don't use overflow here, but try with: "width:100%;"
}

在这里你可以找到一个更通用的例子(http://jsfiddle.net/glee/6Cavr/)

关于css - twitter bootstrap 中的双列布局,第一列宽度固定,第二列宽度填充其余空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17295533/

相关文章:

html - 仅在 <html class ="test"> 所在的页面上设置某个 <div> 的样式

javascript - DIV 坚持到顶部,直到被下一个 DIV 推到屏幕外

javascript - Bootstrap 3 悬停时折叠

javascript - 如何在模式关闭时通过单击关闭来停止 Vimeo 播放

html - 自适应 Google 广告未显示在我的网站上

javascript - 使用 Bootstrap 或 CSS 调整窗口大小时如何让子 div 保持在其他子之上

jQuery 不会将显示更改为 block

css - 可以使用 LESS 变量作为 @supports 规则吗?

javascript - 向 WP 主题添加新的导航菜单

html - 页面布局在不同的计算机上变得困惑,自动调整问题