两栏布局
代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Two-column-Layout</title>
<style>
#content:after {
content: '';
display: block;
clear: both;
}
#aside {
width:200px;
height:500px;
background:red;
float:left;
}
#main {
margin-left:210px;
height:700px;
background:blue;
}
#footer {
background:transparent;
}
</style>
</head>
<body>
<div id="content">
<div id="aside"></div>
<div id="main"></div>
</div>
<div id = "footer"></div>
</body>
</html>
网友评论