CSS左右两列自适应高布局示例代码

夕阳的金辉把绿色的林海染成金黄一片。火红的太阳慢慢地西落了,归鸟们纷纷从我头上飞过,飞回到它们的小巢。一轮明月从东方静悄悄地升上来。夜空中美丽的星星,似乎在眨着眼睛对我说:夜,来了!
复制代码
代码如下:

<!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=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
*{
margin :0px;
padding: 0px;
}
.da_div{
width: 750px;
background-image: url(http://www.as1983.com/blog/attachments/month_0708/z200782114026.gif);
margin:0px auto;
margin-top:3px;
overflow:hidden
}
.top_200{
border-top:1px solid #afafaf;
width: 200px;
float: left;
overflow:hidden
}
.t200_text{
width: 200px;
line-height:1.6em;
font-size: 12px;
}
.top_540{
width :540px;
height: 12px;
float:right;
border-top: 1px solid #afafaf;
}
.t540_text{
font-size: 12px;
width: 200px;
line-height:1.6em;
}
.da_div_xia{
width: 750px;
margin: 0px auto 0px auto;
}
-->
</style>
</head>
<body>
<div class="da_div">
<div class="top_540">
<div class="t540_text">fdsfjdsklfds</div>
</div>
<div class="top_200">
<div class="t200_text">fdfdsfdsfdsfds

fdsfdsfds

fdsfds

fdsfdsfds

fdsfdsf


Fds

fdsfdsfds

fdsfds

fdsfdsfds

fdsfdsf


Fds

fdsfdsfds

fdsfds

fdsfdsfds

fdsfdsf


Fds

fdsfdsfds

fdsfds

fdsfdsfds

fdsfdsf


Fds

fdsfdsfds

fdsfds

fdsfdsfds

fdsfdsf


Fds


fds</div>
</div>
</div>
<div class="da_div_xia">
<div class="top_540"> </div>
<div class="top_200"> </div>
</div>
</body>
</html>

本文CSS左右两列自适应高布局示例代码到此结束。从风雨中寻找愉悦,在挫折中持续坚韧。小编再次感谢大家对我们的支持!

您可能有感兴趣的文章
css display table 自适应高度、宽度问题的如何解决

详解CSS多种三列自适应布局如何实现

CSS如何实现三栏布局中间一栏自适应且随文字大小变化宽度的示例代码

CSS如何实现宽度自适应宽高16:9的矩形的示例

CSS 如何实现高度自适应铺满整屏的如何实现