CSS @position-try

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

@position-try

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The @position-try CSS at-rule is used to define a custom position try fallback option, which can be used to define positioning and alignment for anchor-positioned elements. One or more sets of position try fallback options can be applied to the anchored element via the position-try-fallbacks property or position-try shorthand. When the positioned element is moved to a position where it starts to overflow its containing block or the viewport, the browser will select the first position try fallback option it finds that places the positioned element fully back on-screen.

Each position option is named with a dashed-ident and contains a descriptor list specifying declarations that define information such as inset position, margin, sizing, and self-alignment. The dashed-ident is used to reference the custom position option in the position-try-fallbacks property and position-try shorthand.

For detailed information on anchor features and position try fallback usage, see the CSS anchor positioning module landing page and the Fallback options and conditional hiding for overflow guide.

版权声明

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

上一篇:CSS @page 下一篇:CSS 属性
作者文章
热门
最新文章
标签列表