【发布时间】:2016-05-25 22:30:59
【问题描述】:
我的 html 页面中有一个 header 和 content div。我想在我的内容中设置一个 100% 但不显示滚动条的图像或地图。用页眉和内容调整页面高度。
<div class="head">
Header
</div>
<div class="content">
<img class="image" src="http://images.all-free-download.com/images/graphiclarge/daisy_pollen_flower_220533.jpg"/>
</div>
而我的 CSS 是这样的。
html, body {height: 100%}
.head{
border: 1px solid red;
height: 100px;
width: 100%;
}
.content{
border: 1px solid blue;
height: 100%;
width: 100%;
}
.image{
height: 100%;
width: 100%;
}
【问题讨论】: