CSS Bootstrap 中的固定宽度列和流体内容区域

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12151346/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 20:00:27  来源:igfitidea点击:

Fixed width column and fluid content area in Bootstrap

csstwitter-bootstrap

提问by brentonstrine

I want to use Twitter Bootstrap to mix fixed and fluid width columns, exactly like this.

我想使用 Twitter Bootstrap 来混合固定和可变宽度的列,就像这样

As you can see, it is trivially easy to do with HTML and CSS. Is there a way to do it using bootstrap only?

如您所见,使用 HTML 和 CSS 非常容易。有没有办法只使用引导程序来做到这一点?

回答by Danny

There is no way in Bootstrap to prevent from fluid style. You have to write new class and use it in the same div.

Bootstrap 没有办法防止流体风格。您必须编写新类并在同一个 div 中使用它。

<div class="span4 newclass">

.newclass{width:200px!important}

回答by Dan Gayle

You'll have to create a span that contains a fixed-width column absolutely positioned to the left or to the right and then add another column with a margin wide enough to fit the fixed column.

您必须创建一个包含绝对位于左侧或右侧的固定宽度列的跨度,然后添加另一列的边距足以容纳固定列。