61,115
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<head>
<title>float demo</title>
<style>
.one{
float:left;
background-color:#567;
height: 120px;
width:450px;
}
.two{
float:left;
background-color:#356;
height:120px;
width:450px;
}
.three{
float:left;
background-color:#978;
height:120px;
width:450px;
}
</style>
</head>
<body>
<div class="parent">
<div class="one">
This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block.
</div>
<div class="two">
This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block.
</div>
<div class="three">
This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block.
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<head>
<title>float demo</title>
<style>
.one{ background-color:#567;
height: 120px;
width:450px;
}
.two{
background-color:#356;
height:120px;
width:450px;
}
.three{
background-color:#978;
height:120px;
width:450px;
}
</style>
</head>
<body>
<div class="parent">
<div class="one">
This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block. This is the No.1 div block.
</div>
<p class="two">
This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block. This is the No.2 div block.
</p>
<div class="three">
This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block. This is the No.3 div block.
</div>
</div>
</body>
</html>