index.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, maximum-scale=1.0, user-scalable=0,mininum-scale=1.0">
<title>Document</title>
<!-- 引入初始化样式 -->
<link rel="stylesheet" href="css/normalize.css">
<!-- 引入首页样式 -->
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<header class="app">
<ul>
<li>123</li>
<li>123</li>
<li>123</li>
<li>123</li>
</ul>
</header>
</body>
</html>
index.css
ul {
margin: 0;
padding: 0;
}
ul li {
list-style-type: none;
}
.app ul li {
float: left;
height: 50px;
}
.app ul li:nth-child(1) {
width: 8%;
background-color: #232326;
}
.app ul li:nth-child(2) {
width: 10%;
background-color: #232326;
}
.app ul li:nth-child(3) {
width: 57%;
background-color: #232326;
}
.app ul li:nth-child(4) {
width: 25%;
background-color: #cd2525;
}