踩 IE

I hate IE forever.

IE一个极其愚蠢的宽度计算BUG

当你想使用一个3列均为相对宽度,总宽度为100%的流动布局时,请注意,IE也许会给你开一个大玩笑,看下面的代码:
<style type="text/css">* {
margin:0;
padding:0;
}
.div1 {
float:left;
width:15%;
background:red;
}
.div2 {
float:left;
width:70%;
background:#00FFCC;
}
</style>
<div class="div1">此处显示  class "div1" 的内容</div>
<div class="div2">此处显示  class "div2" 的内容</div>
<div class="div1">此处显示  class "div1" 的内容</div>
请把分辨率调至1024*768,然后打开IE最大化窗口后看这段代码的显示效果。 不出意外的话,第三列应该跑到下面去了。如果拖动窗口改变窗口大小的话,会看到3列有时可以并列有时不可以,显然这是IE的宽度计算不够精确导致的。 结论:I hate IE forver.

今天算是切实地感受到了Google对Opera的轻视...很实用的DHTML网站

Comments

Anonymous Monday, May 22, 2006 1:42:29 AM

xmlhtml.com.cn writes: 是啊,看来微软不太重视这个捆绑的软件。

Anonymous Wednesday, May 31, 2006 3:26:21 PM

Anonymous writes: 恨死IE了,可能也是因为这个毛病,在我的一个设计中,本来拼接很好的背景图,在调整窗口宽度的时候就有条缝隙一隐一现的,恶心死了。

qicai02 Friday, June 9, 2006 2:10:56 AM

哎呀,这是常见的现象啊!

糊记musiccow Wednesday, June 14, 2006 2:15:31 PM

我以前尝试写网页时也碰过这种问题啊,头疼得不得了

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies