2

我正在使用 Bootstrap 的响应式网格来布局 HTML 页面。虽然表单在 Chrome 中看起来很完美,但在 IE7 中,当我使用边框时,盒子模型会在流体中跳下。

例子:

HTML:

<div class="row-fluid">
    <div class="box span3"></div>
    <div class="box span3"></div>
    <div class="box span3"></div>
    <div class="box span3"></div>
</div>

CSS:

.box{
   border:5px solid red;
}

此 HTML 和 CSS 在 Chrome、Firefox、IE 8、9 和 10 中运行良好。

为什么,在 IE7 中最后一个跨度会跳下来?

我知道这是一个带有盒子模型的 IE 错误,你知道如何修复它吗?

4

1 回答 1

0

在 IE 7 的页面中添加此脚本

 <!--[if IE 7]>
<style>
    .row-fluid .span3{
        width:22.80% !important;
    }
</style>
<![endif]-->
于 2013-06-11T04:57:06.503 回答