<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<!--注意:块级标签浮动的时候如果前面的标签浮动,后边的标签不浮动,前面标签会覆盖后面的标签-->
<!--====================浮动示例1=====================-->
<!--<div id="" style="background-color: greenyellow; width: 100px; height: 100px; float: left;">div1</div>
<div id="" style="background-color: hotpink; width: 100px; height: 150px;">div2</div>
-->
<!--====================浮动示例2=====================-->
<!--<div id="" style="background-color: greenyellow; width: 100px; height: 100px; float: right;">div1</div>
<div id="" style="background-color: hotpink; width: 100px; height: 150px;">div2</div>-->
<!--====================浮动示例3=====================-->
<!--<div id="" style="background-color: greenyellow; width: 100px; height: 100px;">div1</div>
<div id="" style="background-color: hotpink; width: 100px; height: 150px; float: left;">div2</div>-->
<!--====================浮动示例4=====================-->
<div id="" style="background-color: greenyellow; width: 100px; height: 100px; float: left;">div1</div>
<div id="" style="background-color: hotpink; width: 100px; height: 150px; float: left;">div2</div>
<div id="" style="background-color: orangered; width: 100px; height: 200px;"></div>
</body>
</html>
网友评论