如何填充可用的高度在屏幕上与任何高度的div? [英] How to fill the the available height on screen with the div for any height?
本文介绍了如何填充可用的高度在屏幕上与任何高度的div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用< header>
填充任何大小的屏幕(宽度和高度):
I want to fill the screen (width and height) on any size with a <header>
:
<header></header>
<div id="content"></div>
<footer></footer>
< header>
在iPad的任何高度的显示器上的整个屏幕,使得< div id =content>
的内容将仅在滚动之后才被看到, 。
The <header>
should always fill the whole screen on any height of monitor also in iPad, such that the content of <div id="content">
will only be seen after scrolling, not before that.
推荐答案
只需给出 html
,身体
& header
高度为100%:
Simply give your html
, body
& header
a height of 100%:
html, body, header {
height: 100%
}
这篇关于如何填充可用的高度在屏幕上与任何高度的div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文