abstract:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, in
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>浮动</title>
<style>
ul li{
list-style: none;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
background: #ccc;
margin: 5px;
float:left;
}
div{
width: 200px;
height: 200px;
background: pink;
}
.clear{
clear: both;
}
</style>
</head>
<body>
<ul>
<li class="html">html</li>
<li>css</li>
<li>javascript</li>
<li>vue</li>
<li>php</li>
</ul>
<div class="clear"></div>
<div>demo1</div>
<div>demo2</div>
<div>demo3</div>
</body>
</html>