@supports 支持
发布于 4 年前 作者 renmin 14585 次浏览 来自 问答

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

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

3 回复

iOS11.2 之后不支持constant。

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

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

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

回到顶部