100%浮动div和的div css修复
我怎样才能解决让IE放弃最后一个div的问题100%浮动div和的div css修复,css,internet-explorer,Css,Internet Explorer,我怎样才能解决让IE放弃最后一个div的问题 <div> <div style="float:left; width:25%;"></div> <div style="float:left; width:50%;"></div> <div style="float:left; width:25%;"></div> </div> 这应该是正确的,但在旧版IE上,它会使最后一个div出现在样式
<div>
<div style="float:left; width:25%;"></div>
<div style="float:left; width:50%;"></div>
<div style="float:left; width:25%;"></div>
</div>
这应该是正确的,但在旧版IE上,它会使最后一个div出现在样式表中css下方的新行上
div{
margin:0;
padding:0;
}
默认情况下,它有一些空白和边距,需要重置为0。尝试以下操作:
<div style="float:left; width: 100%;">
<div style="float:left; width:25%;"></div>
<div style="float:left; width:50%;"></div>
<div style="float:left; width:25%;"></div>
</div>
文本
文本
文本
这是演示
你确定你的浏览器缩放值。应该是100%。如果您使用IE 10,您应该在开发者工具(F12)上设置浏览器模式和文档模式。可能有一个空间以折叠形式显示,请尝试
<div style="font-size:0px">
<div style="float:left; width:25%;"></div>
<div style="float:left; width:50%;"></div>
<div style="float:left; width:25%;"></div>
</div>
sorry没有指定,但它的填充和边距都等于零,所以你在说什么IE版本??有什么特别的吗?使用它对您很有帮助。这似乎不是完整的代码,因为没有div元素的高度,它们就不可见。发布完整的代码或相关代码,并尝试在jsfiddle.net上进行修改。
<div style="font-size:0px">
<div style="float:left; width:25%;"></div>
<div style="float:left; width:50%;"></div>
<div style="float:left; width:25%;"></div>
</div>