<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>4. 两列布局2: 左边主体自适应_右边栏固定宽度</title>
<style type="text/css">
.right {
width: 200px;
height: 600px;
float: right;
background-color: skyblue;
}
.main {
height: 600px;
background-color: cyan;
margin-right:200px;
}
</style>
</head>
<body>
<!-- DOM -->
<div class="main">左侧_主体</div>
<div class="right">右侧</div>
<!-- css样式不变,两个div块 交换先后顺序,则会一上一下显示而不能同行显示。这是为什么?-->
</body>
</html>