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

WBOY
Release: 2016-06-24 11:49:34
Original
1035 people have browsed it

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;
Copy after login

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!