p标签如果是div标签的话,就是另个一个效果了,这样容易引起误会的。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
#box1{height: 50px;background-color: red;float: left;}
#box2{height: 100px;background-color: blue;float:right;}
#box3{height:150px;width:300px;background-color: black;}
</style>
</head>
<body>
<div id="box1">盒子1</div>
<div id="box2">盒子2</div>
<div id="box3">盒子3</div>
<p>fjkdlsjfkjslkjfdlskjdflkjsdklfjsljkdlljkdlsjfkjslkjfdlskjdflkjsdklfjsl</p>
<p>fjkdlsjfkjslkjfdlskjdflkjsdklfjsljkdlljkdlsjfkjslkjfdlskjdflkjsdklfjsl</p>
</body>
</html>