webveuje/teaching/heshubao/float1.html
2021-06-03 10:52:41 +08:00

58 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.item {
width: 100px;
height: 100px;
background: blue;
border: 1px solid yellow;
/* float: left; */
display:inline-block
}
.box{
width: 500px;
background-color: white;
border: 0;
}
.item1{
width: 200px;
height: 300px;
background: red;
}
</style>
</head>
<body>
<div class="box">
<div class="item"></div>
<!-- <div class="item"></div> -->
<div class="item"></div>
<div class="item"></div>
<!-- <div class="item1"></div> -->
<p>浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮动浮
</p>
</div>
<!--
form =》 表单
css
width height margin padding float flex position absolute relative
fixed staicy
-->
</body>
</html>