<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.divClass{
border:1px solid blue;
width:200px;
height:220px;
background-color:red;
}
.divClass{
float:right;
}
.clear{
clear:both;
}
</style>
</head>
<body>
<div id="d1" class="divClass" style="background-color:blue">DIV1</div>
<div id="d2" class="divClass" style="background-color:yellow">DIV2</div>
<div id="d3" class="divClass" style="background-color:pink">DIV3</div>
<div class="clear"></div>
<div id="d4" class="divClass" style="background-color:orange">DIV4</div>
</body>
</html>
浮动效果
最新推荐文章于 2022-10-19 16:42:03 发布