Skip to content

Instantly share code, notes, and snippets.

@blackcater
Created November 13, 2018 07:26
Show Gist options
  • Save blackcater/5b370489bfeba402332893b93907aff8 to your computer and use it in GitHub Desktop.
Save blackcater/5b370489bfeba402332893b93907aff8 to your computer and use it in GitHub Desktop.
Fit iphonex
// constant(safe-area-inset-top):在Viewport顶部的安全区域内设置量(CSS像素)
// constant(safe-area-inset-bottom):在Viewport底部的安全区域内设置量(CSS像素)
// constant(safe-area-inset-left):在Viewport左边的安全区域内设置量(CSS像素)
// constant(safe-area-inset-right):在Viewport右边的安全区域内设置量(CSS像素)
// constant 为 iOS 11 推荐,于 iOS 11.2 后更改为 env
// top, bottom, left, right 指你当前手机朝向的上下左右
@blackcater
Copy link
Author

blackcater commented Nov 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment