我正在使用 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 中最后一个 span 会向下跳转?
我知道这是一个关于盒子模型的 IE 错误,你知道如何修复它吗?
最佳答案
在 IE 7 的页面中添加此脚本
<!--[if IE 7]>
<style>
.row-fluid .span3{
width:22.80% !important;
}
</style>
<![endif]-->
关于html - IE7 中的 Bootstrap 边框问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17036288/