小编Jon*_*ips的帖子

ie7多个浮动div,其百分比宽度等于容器div内的100%

这似乎适用于ie8,Chrome和Firefox.一切都应该在同一条线上,但在ie7中,由于某种原因,最后一个div似乎并不"适合"并且下降到下一行.是否有一种简单的方法可以使用ie7?

<div style="width: 95%">

    <div style="width: 25%; background-color: blue; float: left;">test1</div>

    <div style="width: 25%;  background-color: green;float: left;">test2</div>

    <div style="width: 25%;  background-color: red;float: left;">test3</div>

    <div style="width: 25%;  background-color: yellow;float: left;">test4</div>

</div>
Run Code Online (Sandbox Code Playgroud)

html css internet-explorer-7

2
推荐指数
2
解决办法
3194
查看次数

标签 统计

css ×1

html ×1

internet-explorer-7 ×1