@supports
AT-RULE,最初僅限於屬性/價值對檢查,現在使用selector()
>和字體格式/技術檢查使用font-format()
>和font-tech()
來支持選擇器檢查。 但是,直接測試其他設備支撐仍然是一個挑戰。 計劃中的包裝器功能雖然有前途,但缺乏廣泛的瀏覽器實現。 at-rule()
>檢查了幾個在瀏覽器的瀏覽器支持級別:
>
@container
或container-type
>
container-name
container
@container
態
@supports (container-type: size) { /* Size queries are supported! */ }
@font-feature-values
部分支持(需要解決方案):font-variant-alternates
@supports (font-variant-alternates: swash(custom-ident)) { /* @font-feature-values is supported! */ }
@font-palette-values
font-palette
@supports (font-palette: normal) { /* @font-palette-values is supported! */ }
>> 的支持。
@container
:@container
> .container { --supports-style-queries: true; } .container .child { /* Base styles */ } @container style(--supports-style-queries: true) { /* Container queries are supported! */ .child { /* Override base styles */ } }
@counter-style
<custom-ident></custom-ident>
:list-style-type
>類似於樣式查詢,採用了漸進式增強策略,其基礎樣式在@counter-style
> block中被覆蓋。 @supports (list-style: custom-ident) { /* @counter-style is supported! */ }
@position-try
>可以使用> anchor-name
position-try
@supports (position-try: flip-block) { /* @position-try is supported! */ }
@scope
>未解決的挑戰:@layer
文章將@property
,@starting-style
和@layer
>。
以上是用於檢測CSS ATRULES支持的食譜的詳細內容。更多資訊請關注PHP中文網其他相關文章!