css+div布局firefox和ie的不同表现
时间:2011-03-23
来源:互联网
HTML code
这个当中IE下正常,firefox下布局错乱。。
HTML code
<div style="height:500px; width:300px;" > <div style="width:30%; height:50%; background-color:Green; float:left;"></div> <div style="width:30%; height:50%; background-color:Red; float:left; clear:left;"></div> <div style="width:70%; height:100%; background-color:Yellow; float:right;"></div> </div>
这个当中IE下正常,firefox下布局错乱。。
HTML code
<div style="height:500px; width:300px;" > <div style="width:30%; height:50%; background-color:Green; float:left;"></div> <div style="width:70%; height:100%; background-color:Yellow; float:right;"></div> <div style="width:30%; height:50%; background-color:Red; float:right;"></div> </div> 这样的话两者都正常。。 请问情况1为什么firefox下不行呢?请指教!~谢谢~~
作者: littlecc2009 发布时间: 2011-03-23
<div style="height:500px; width:300px;" >
<div style="width:30%; height:50%; background-color:Green; float:left;"></div>
<div style="width:70%; height:100%; background-color:Yellow; float:right;"></div>
<div style="width:30%; height:50%; background-color:Red; float:left;clear:left;"></div>
</div>
里面三个div的嵌套顺序又问题,改成这样试试,应该可以了,也就是将第二个div和第三个颠倒一下
<div style="width:30%; height:50%; background-color:Green; float:left;"></div>
<div style="width:70%; height:100%; background-color:Yellow; float:right;"></div>
<div style="width:30%; height:50%; background-color:Red; float:left;clear:left;"></div>
</div>
里面三个div的嵌套顺序又问题,改成这样试试,应该可以了,也就是将第二个div和第三个颠倒一下
作者: intachi 发布时间: 2011-03-24
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28