答案是:你做不到.overflow:hidden
然后,父母都会剪切所有子元素,或者overflow:(visible|auto|scroll|...)
根据该规则处理所有子元素.你不可能混合各州 - 所有的孩子都得到平等对待.
但是,你可以在父代码中引入额外的容器元素(不再有溢出:隐藏),就像在这个伪代码中一样:
<parent>
<container1 style="overflow:hidden">
<!-- these will be clipped -->
<element>
<element>
</container>
<container2 style="overflow:visible">
<!-- these will be shown -->
<element>
<element>
</container>
</parent>
Run Code Online (Sandbox Code Playgroud)
编辑:示例