<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
.right,.left{height:300px;200px;}
.right{ float:right;background:#000000;}
.left{ float:left;background:#009933;}
.main{background:#F60; height:300px;}
</style>
</head>
<body>
<div class="right">RIGHT</div>
<div class="left">LEFT</div>
<div class="main">MAIN</div>
</body>
</html>
代码演化2:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
.right, .left {
height: 300px;
200px;
}
.right {
float: right;
background: #000000;
margin-right:10%;
}
.left {
float: left;
background: #009933;
margin-left:10%;
}
.main {
background: #F60;
height: 300px;
margin:0 10%;
}
</style>
</head>
<body>
<div class="right">RIGHT</div>
<div class="left">LEFT</div>
<div class="main">MAIN</div>
</body>
</html>
代码演化3:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
#outbox {
80%;
margin-right: auto;
margin-left: auto;
min-500px;
}
.right, .left {
height: 300px;
200px;
}
.right {
float: right;
background: #000000;
}
.left {
float: left;
background: #009933;
}
.main {
background: #F60;
height: 300px;
}
</style>
</head>
<body>
<div id="outbox">
<div class="right">RIGHT</div>
<div class="left">LEFT</div>
<div class="main">MAIN</div>
</div>
</body>
</html>
代码演化4:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Layout</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
position: relative;
}
.right, .left {
height: 300px;
200px;
z-index: 2;
}
.right {
position: absolute;
right: 0;
top: 0;
background: #000000;
}
.left {
position: absolute;
left: 0;
top: 0;
background: #009933;
}
.main {
margin-right: 200px;
background: #F60;
height: 300px;
margin-left: 200px;
}
</style>
</head>
<body>
<div class="main">main</div>
<div class="left">LEFT</div>
<div class="right">RIGHT</div>
</body>
</html>
回答问题:
请分别说出上面的这种布局的主要特点.