CSS中IE6浮动模型Bug详解

CSS中IE6浮动模型Bug详解

  CSS浮动模型可以说是标准布局中不可或缺的组成部分,可是对于浮动模型在IE6的表现症状你是否已经完全了解或者掌握呢?如果你的答案是肯定的,那恭喜你不用听我的嗦了,如果你的答案是模糊的,那么下面的讨论或许对你以后的学习有所帮助。

  首先看一下W3C对浮动模型部分解释(http://www.w3.org/TR/REC-CSS2/visuren.html):

  Since a float is not in the flow, non-positioned block boxes created before and after the float box flow vertically as if the float didn’t exist. However, line boxes created next to the float are shortened to make room for the floated box. Any content in the current line before a floated box is reflowed in the first available line on the other side of the float. 

  A float can overlap other boxes in the normal flow (e.g., when a normal flow box next to a float has negative margins). When an inline box overlaps with a float, the content, background, and borders of the inline box are rendered in front of the float. When a block box overlaps, the background and borders of the block box are rendered behind the float and are only be visible where the box is transparent. The content of the block box is rendered in front of the float. 

  从中我们可以得到几个基本信息:

  1、如果浮动元素在非浮动块元素之后,则浮动元素将会出现在非浮动块元素的下方;

第 1 2 页

CSS中IE6浮动模型Bug详解

相关文章:

你感兴趣的文章:

标签云: