简体   繁体   English

为什么iOS 10上的最小高度100vh导致大窗口?

[英]Why min-height 100vh on iOS 10 results in large window?

Can someone explain to me why when I set min-height of my section to calc(100vh), it results in a large window size and small text on iOS 10 (iPhone SE)? 有人可以向我解释为什么当我将我的部分的最小高度设置为calc(100vh)时,会导致iOS 10(iPhone SE)上的窗口大而文本小吗?

 section { display: flex; display: -webkit-flex; display: -webkit-box; align-items: center; -webkit-align-items: center; -webkit-box-align: center; min-height: calc(100vh); text-align: center; } section div { width: 100%; } 
 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Title</title> </head> <body> <section> <div> <h1>Title</h1> <h2>Description</h2> </div> </section> </body> </html> 

have you make default body styling. 您是否使用默认的身体样式。 body{margin:0; padding:0} body{margin:0; padding:0} if not please try this. body{margin:0; padding:0} ,否则请尝试此操作。 It may solve your issue if you are using above html,css. 如果您使用的是html,css以上,则可能会解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM