<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
/*
没有访问过的链接颜色
*/
a:link{
color: yellowgreen;
}
/*
访问过的链接颜色
*/
a:visited{
color: black;
}
/*
鼠标滑过的链接颜色
*/
a:hover{
color: orange;
}
/*
访问过的链接颜色
*/
a:active{
color: red;
}
*{
margin: 0;
padding: 0;
}
.nva{
list-style: none;
background-color: #f8976;
width: 1000px;
border-left:1px solid gold;
border-top: 1px solid gold;
border-bottom: 1px solid gold;
margin: 50px auto;
overflow: hidden;
}
.nva li{
float: left;
width: 14.285714286%
}
a{
border-right: 1px solid gold;
display: block;
text-decoration: none;
width: 100%;
text-align: center;
padding: 5px 0;
text-decoration: none;
font-weight: bold;
line-height: 50px;
color:white;
height: 50px;
}
}
</style>
</head>
<body>
<ul class="nva ">
<li><a href="#">首页</a></li>
<li><a href="#">公司简介</a></li>
<li><a href="#">解决方案</a></li>
<li><a href="#">公司新闻</a></li>
<li><a href="#">行业动态</a></li>
<li><a href="#">招贤纳才</a></li>
<li><a href="#">联系我们</a></li>
</ul>
</body>
</html>
image.png
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
*{
margin: 0;
padding: 0;
}
/*去除项目符号*/
.nav{
list-style: none;
background-color: #6495ed;
width: 1000px;
/*设置剧中*/
margin: 50px auto;
/*解决高度塌陷*/
overflow: hidden;
}
.nav li{
float: left;
width: 12.5%;
}
.nav a{
display: block;
width: 100%;
text-align: center;
padding: 5px 0;
text-decoration: none;
font-weight: bold;
color: white;
}
.nav a:hover{
background-color: red;
}
</style>
<title>asd</title>
</head>
<body>
<ul class="nav">
<li><a href="#">首页</a></li>
<li><a href="#">新闻</a></li>
<li><a href="#">联系</a></li>
<li><a href="#">关于</a></li>
<li><a href="#">首页</a></li>
<li><a href="#">新闻</a></li>
<li><a href="#">联系</a></li>
<li><a href="#">关于</a></li>
</ul>
</body>
</html>
image.png
网友评论