CSS 新特性 contain,用于控制页面的重绘和重排
作者: chokcoco创建于 2017年8月13日更新于 2025年7月31日
标签原理
contain: paint: Setting the `contain: paint` property for an element means that the element has layout constraints, that is, it tells the user agent that the element’s descendants will not be displayed outside its boundaries. Therefore, if the element is not visible on the screen or is otherwise set to be invisible, it can still be guaranteed that its descendants will not be rendered.
内容来源: chokcoco/iCSS