【发布时间】:2015-04-08 19:00:45
【问题描述】:
我使用另一个页面创建了这个 CSS 页面演示 http://jsfiddle.net/a3210pea/ http://jsfiddle.net/XGhP8/71/
第二页占据了整个页面,但我创建的页面没有占据整个页面。
我的 CSS 是这样的
html, body {
min-height:100%;
padding:0;
margin:0;
}
#wrapper {
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
}
.table {
display:table;
width:100%;
height:100%;
}
.row {
display:table-row;
}
.cell {
display:table-cell;
}
.middle {
height:100%;
}
.bottom {
background-color:blue;
}
.top {
background-color: white;
}
.left {
width:100px;
background:red;
height:100%;
}
.right {
background:orange;
height:100%;
}
.top.row {
height : 6%;
width : 100%;
background-color : pink;
}
.row > .cell{
width : 100%;
}
.cell > #logo {
width : 15%;
float : left;
}
.cell > #heading {
width : 84%;
text-align : center;
}
.banner {
font-weight: bold;
font-size: large;
color: black;
font-family: sans-serif;
}
#content_border {
margin : 0.3em;
border-style : solid;
border-width : 2px;
border-color : black;
}
img {
max-width : 100%;
height : auto;
}
.text {
font-size: 2.5vw;
}
我用作基础的 CSS 是这样的:-
html, body {
min-height:100%;
padding:0;
margin:0;
}
#wrapper {
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
}
.table {
display:table;
width:100%;
height:100%;
}
.row {
display:table-row;
}
.cell {
display:table-cell;
}
.middle {
background-color:green;
height:100%;
}
.bottom {
background-color:blue;
}
.top {
background-color:pink;
}
.left {
width:100px;
background:red;
height:100%;
}
.right {
background:orange;
height:100%;
}
我做错了什么?
【问题讨论】: