div+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=utf-8" />


<title>布局</title>
<style type="text/css">
.div1{
    border:1px solid red;
    width:300px;
    height:200px;
    float:left;
    margin-bottom:3px;}

.div2{
    
    border:1px solid red;
    width:300px;
    height:300px;
    float:left;
    clear:both;
    
    }
.div3{
    position:relative;
    top:-205px;
    border:1px solid red;
    width:550px;
    height:505px;
    float:left;
    margin-left:5px;
    
    
}

</style>
</head>

<body>

    <div class="div1"></div>
    <div class="div2"></div>

<div class="div3"></div>
</body>
</html>

posted @ 2015-10-30 22:08  web前端小计  阅读(387)  评论(0编辑  收藏  举报