Skip to content

Instantly share code, notes, and snippets.

@rockonyu
Created July 13, 2020 10:20
Show Gist options
  • Save rockonyu/cb3df2767fef0cb06df467a6455d071c to your computer and use it in GitHub Desktop.
Save rockonyu/cb3df2767fef0cb06df467a6455d071c to your computer and use it in GitHub Desktop.
在 iOS 的 safari 套用 100vh
// ref: https://css-tricks.com/css-fix-for-100vh-in-mobile-webkit/
body {
min-height: 100vh;
min-height: -webkit-fill-available;
}
html {
height: -webkit-fill-available;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment