我想更改导航栏上边框的颜色,但它对我不起作用。这是我的代码:
<!DOCTYPE html>
<html>
<head>
<title> site </title>
</head>
<style type="text/css">
body
{
background-color:#75b5d6;
color:white;
font-family:"Arial";
text-align:center;
}
a:link
{
color:white;
}
a:visited
{
color:white;
}
a:hover
{
color:white;
}
a:active
{
color:white;
}
.nav
{
border:3px solid white;
border-width:0px;
list-style:none;
margin:2;
padding:2;
text-align:center;
background-color:orange;
font-family:"Bookman Old Style";
}
.nav li{
display:inline;
}
.nav a
{
display:inline-block;
padding:10px;
}
h1
{
font-size:40;
font-family:"Lucida Handwriting";
}
h2
{
font-size:27.5;
text-decoration:underline;
}
p
{
font-size:12;
}
</style>
<body>
<h1> Kevril.net </h1>
<ul class="nav">
<li><a href="x">Home</a></li>
<li><a href="x">site1</a></li>
<li><a href="x">site2</a></li>
</ul>
<h2>Welcome</h2>
<p>Hellow</p>
</body>
</html>
我做错了什么?它是css部分还是html中的东西?如果您能提供帮助,我将非常高兴。谢谢。