【问题标题】:Full height does not work when adding bootstrap css添加引导 css 时全高不起作用
【发布时间】:2014-02-06 12:09:29
【问题描述】:

我在这里使用了示例

Twitter bootstrap 3 two columns full height

我刚刚在文件中添加了 bootstrap.css

http://jsfiddle.net/qhoc/scsGj/136/

http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css

如果我在 jsfiddle 中运行,那很好。但是,如果我在 jsfiddle 之外运行,它就不再具有完整的高度。见:http://jsfiddle.net/m/jva/

关于为什么会出现这个问题的任何建议?

【问题讨论】:

  • 您能否将代码包含在您的帖子中,而不是强迫人们在其他地方寻找代码。

标签: html css twitter-bootstrap stylesheet


【解决方案1】:

请注意,如果您将宽度扩大到某个点以上,则会重现该问题。

有问题的引导 css 位于浮动受影响元素的媒体查询内部。

 @media(min-width:992px) {

 .col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-      9,.col-md-10,.col-md-11,.col-md-12 {
       float: left
   }

当我更改 th 窗口宽度时,通过检查 chrome 开发工具中元素的计算样式,我能够找到问题。

这是一个修复:

.row > div {
float:none;
}

http://jsfiddle.net/scsGj/138/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多