css画页面的时候,喜欢使用百分比实现等分布局
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
ul {
width: 100%;
height: 200px;
background-color: #ccc;
}
ul li {
width: 33.3%;
height: 200px;
list-style: none;
float: left;
padding: 0 10px;
}
ul li div {
width: 100%;
height: 200px;
background-color: blue;
}