@supports 支持

发布于 6 年前作者 renmin14784 次浏览最后编辑 6 年前来自 ask

希望能支持下面的写法,适配 iPhoneX 就比较方便了

@supports (bottom: constant(safe-area-inset-bottom)) {}

3 回复
linli
linli1 楼6 年前

iOS11.2 之后不支持constant。

gyan
gyan2 楼6 年前

等吧

wuguiying
wuguiying3 楼4 年前

发现以下方式只在真机有效,目前测试发现 env 函数有效,constant 函数现在还不支持?

@supports (bottom: constant(safe-area-inset-bottom)) {}

@supports (bottom: env(safe-area-inset-bottom)) {}