61,114
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<title>导航条练习</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
}
.nav {
list-style: none;
width: 1000px;
margin: 50px auto;
display: flex;
justify-content: space-between;
}
.item {
background-color: PowderBlue;
text-align: center;
padding: 5px;
width: 25%;
}
.item:hover {
background-color: rgb(190, 226, 89);
}
</style>
</head>
<body>
<ul class="nav">
<li class="item"><a href=#>首页</a></li>
<li class="item"><a href=#>我们</a></li>
<li class="item"><a href=#>刷新</a></li>
<li class="item"><a href=#>联系</a></li>
</ul>
</body>
<html>