将div高度扩展到整个网页 [英] extend div height to entire webpage

查看:59
本文介绍了将div高度扩展到整个网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用CSS将div的高度扩展到整个网页?

Is there a way I can extend the height of a div to the entire webpage using css?

我没有使用

.height
 {
  height:100%;
  }

但这只会扩展到div内内容的高度.即使其中仅包含一行内容,该div仍应覆盖整个网页.

But this will only extend to the height of the contents inside the div. The div should cover the entire webpage even if there is just a 1 line worth of content inside it.

推荐答案

<div><!-- make a <div> to hold everything in.. -->

<div style="width:125;height:100%;">blah blah blah</div>

<div style="height:100%;">blah blah blah</div>

</div>

这篇关于将div高度扩展到整个网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆