Home >Web Front-end >HTML Tutorial >Awkward handling of min-height when mobile device page height is insufficient_html/css_WEB-ITnose

Awkward handling of min-height when mobile device page height is insufficient_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:49:341067browse

When making HTML5 pages, we often encounter that the page content is too small to support the entire height of the mobile phone screen.

We often use min-height for processing, such as min-height:568px; corresponding to the height of iPhone5;

In this way, there will be a blank space below iPhone6plus.

And if you set min-height:736px; iPhone5, a scroll bar will appear;

At this time we can use

position:absolute;left:0;right:0;top:0;bottom:0;

to Once min-height is removed, it will adapt to 100% height of any screen.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn