overflow:hidden
overflow:hidden并不隐藏所有溢出的子元素
需要同时满足以下条件:
- 拥有overflow:hidden样式的块元素不具有position:relative和position:absolute样式;
- 内部溢出的元素是通过position:absolute绝对定位.
css2.1:
A descendant box is positioned absolutely, partly outside the box. Such boxes are not always clipped by the overflow property on their ancestors; specifically, they are not clipped by the overflow of any ancestor between themselves and their containing block。
一个绝对定位的后代块元素,部分位于容器之外。这样的元素是否剪裁并不总是取决于定义了overflow属性的祖先容器;尤其是不会被位于他们自身和他们的包含块之间的祖先容器的overflow属性剪裁。