Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【兼容性】之iPhoneX安全区域(Safe Area)底部小黑条在微信小程序和H5的屏幕适配 #7

Open
yihan12 opened this issue Jul 7, 2022 · 0 comments
Labels
【兼容性】 兼容性系列

Comments

@yihan12
Copy link
Owner

yihan12 commented Jul 7, 2022

iPhoneX安全区域(Safe Area)底部小黑条在微信小程序和H5的屏幕适配

overflow: hidden;
height: 100%;
padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/
padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/

padding-top: constant(safe-area-inset-top); /*兼容 IOS<11.2*/
padding-top: env(safe-area-inset-top); /*兼容 IOS>11.2*/

padding-left: constant(safe-area-inset-left); /*兼容 IOS<11.2*/
padding-left: env(safe-area-inset-left); /*兼容 IOS>11.2*/

padding-right: constant(safe-area-inset-right); /*兼容 IOS<11.2*/
padding-right: env(safe-area-inset-right); /*兼容 IOS>11.2*/

兼容性系列

主要是日常业务代码问题整理。

后续会一直更新,希望各位看官不要吝啬手中的赞。

❤️ 感谢各位的支持!!!

❤️ 如果有错误或者不严谨的地方,请务必给予指正,十分感谢!!!

❤️ 喜欢或者有所启发,欢迎 star!!!

@yihan12 yihan12 added the 【兼容性】 兼容性系列 label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
【兼容性】 兼容性系列
Projects
None yet
Development

No branches or pull requests

1 participant