env(safe-area-inset-bottom) 的坑=. =

605 阅读1分钟

如题,习惯了按在样式表里面代码排序按照长短排序,结果就出现了下面这个bug。。。。

padding-bottom: calc(16px + constant(safe-area-inset-bottom));
padding-bottom: calc(16px + env(safe-area-inset-bottom));

上面是正常的,如果按照长度排序,就变成了:

padding-bottom: calc(16px + env(safe-area-inset-bottom));
padding-bottom: calc(16px + constant(safe-area-inset-bottom));

顺序换了之后,会导致不生效。。以此记录一下