读书人

小弟我的IE8这是崩溃了吗

发布时间: 2012-02-09 18:22:27 作者: rapoo

我的IE8这是崩溃了吗?
测试页面1

HTML code
<html><body style="text-align:center;margin-top:0px;margin-left:0px;">  <div style="width:1024px;background-color:red;height:40px;">    <div style="width:1024px;background-color:Gray;height:25px;"></div>    <div style="width:1024px;background-color:Black;height:15px;"></div>  </div>  <div style="width:1024px;background-color:pink;height:20px;"></div></body></html>

效果:


测试页面2
HTML code
<html><body style="text-align:center;margin-top:0px;margin-left:0px;">   <div style="width:1024px;height:40px;background-color:red;">      <div style="width:1024px;height:10px;background-color:Gray;"></div>    <div style="width:1024px;height:30px;background-color:Black;"></div>  </div>     <div style="width:1024px;background-color:pink;height:24px;"></div>   </body></html>

效果:


为毛我总碰到这样古怪的问题。



[解决办法]
style:" float:left"
[解决办法]
HTML code
<html><body style="text-align:center;margin-top:0px;margin-left:0px;">   <div style="width:1024px;height:40px;background-color:red;">      <div style="width:1024px;height:10px;background-color:Gray;"></div><div style="width:1024px;height:30px;background-color:Black;"></div></div><div style="width:1024px;background-color:pink;height:24px;"></div>   </body></html>
[解决办法]
HTML code
<html><body style="text-align:center;margin-top:0px;margin-left:0px; ">   <div style="width:1024px;height:40px;background-color:red;">      <div style="width:1024px;height:10px;background-color:Gray;"></div>    <div style="width:1024px;height:30px;background-color:Black; margin:-18px;"></div>  </div>     <div style="width:1024px;background-color:pink;height:24px; margin:-18px;"></div>   </body></html> 

读书人网 >Java Web开发

热点推荐