CSS overlay

原创
admin 4个月前 (08-23) 阅读数 13 #CSS

overlay

The overlay CSS property determines whether an element in the top layer (such as a displayed popover or modal dialog) is actually rendered in that layer. This property is only meaningful when included in a transition-property list, and only when allow-discrete is specified as the transition-behavior.

It's crucial to understand that overlay values can only be set by the browser—developers cannot modify the overlay value of any element through author styles. However, you can include overlay in an element's transition properties list. This delays its removal from the top layer, allowing for animation rather than immediate disappearance.

Note: When transitioning overlay, you must set transition-behavior: allow-discrete for the animation to occur. Unlike typical discrete animations, overlay animations always display the visible (auto) state for the entire transition duration, regardless of whether it's the starting or ending state.

版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权本站发表,未经许可,不得转载。

上一篇:CSS order 下一篇:CSS paint-order
作者文章
热门
最新文章
标签列表