布局二:左边固定右边自适应
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>左边固定右边自适应</title>
<style type="text/css">
.out{
width: 90%;
margin: 0 auto;
height: 300px;
/*background: yellow;*/
position: relative;
}
.left{
width: 200px;
background: rgba(255,0,0,0.5);
height: 200px;
/*float: left;*/
position: absolute;
left: 0;
top: 0;
}
.right{
height: 500px;
background: blue;
margin-left: 200px;
/*float: right;*/
}
</style>
</head>
<body>
<div class="out">
<div class="left"></div>
<div class="right">你可能遭遇了毒手的攻击和背叛,这导致了我们无法开展调查,内容随便写的只是为了看看效果是怎么样子的。布局分布分多种。常见的需要了解 才能开展工作。</div>
</div>
</body>
</html>