嗨我看过W3并且在这里找不到答案。我已经实现了我想要的布局,但当我开始调整浏览器大小时,它会崩溃。我一直在编码六个星期。为什么布局不行为?当我调整浏览器的大小时,CSS布局会发生变化。我只编了几个星期,并且碰到了一堵砖墙
div {
border: 1px solid black;
padding: 10px;
}
#head {
background-color: red;
height: 150px;
color: white;
font-size: 50px;
text-align: center;
}
#left {
display: inline-block;
width: 47%;
height: 300px;
overflow: auto;
}
#right {
display: inline-block;
width: 49%;
height: 300px;
float: right;
overflow: auto;
}
#footer {
height: 100px;
background-color: blue;
color: white;
}
<div id="head"> The Daily Scumbag</div>
<div id="left">
<h1>This is left column.
</h1>
Lorem Vestibulum
</div>
<div id="right">
尝试搜索'responsive'。 –
我现在就在Patrick身上。欢呼声 – nooby