CSS左右两列自适应高布局示例代码
网站建设 2021-07-03 08:43www.dzhlxh.cn网站建设
复制代码
代码如下:<!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 body背景图全屏不论分辨率大小