div+css制作上左右下的框架页面
2014-10-21来源:易贤网

标准的div+css制作上左右下的框架页面

首先是css代码:

<style type=text/css>

<!--

*{margin:0px;padding:0px;border:0px;list-style-type:none; font-size:12px;text-decoration: none;}

.hd{width: 960px;overflow: hidden;background-color: #33ccff;height: 100px;margin-right: auto;margin-left: auto;}

.bd {width: 960px;overflow: hidden;background-color: #bbcade;margin-right: auto;margin-left: auto;margin-top: 8px;margin-bottom: 8px;}

.bd .l_pt1 {width: 200px;overflow: hidden;background-color: #663366;float: left;height: 200px;clear: left;}

.bd .l_pt2 {width: 200px;overflow: hidden;background-color: #666;height: 200px;margin-top: 8px;clear: left;float: left;}

.bd .r_pt {background-color: #33ccff;margin-left:200px;}

.clear {font-size: 0px;clear: both;overflow: hidden;line-height: 0px;height: 0px;}

.ft {width: 960px;overflow: hidden;background-color: #33ccff;height: 100px;margin-right: auto;margin-left: auto;}

接下来是div:

<div class=hd>此处显示 class hd 的内容</div>

<div class=bd>

<div class=l_pt1>fdsf</div>

<div class=l_pt2>fdsafasf</div>

<div class=r_pt>

<p>dsdasdsadasd</p>

</div>

<div class=clear></div>

</div>

<div class=ft>此处显示 class hd 的内容</div>

更多信息请查看IT技术专栏

推荐信息