伪类实例2
导航栏2.
效果如下:
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" hrefHTM="a.css" />
</head>
<body>
<a href="#">音乐</a>
<a href="#">视频</a>
<a href="#">网页</a>
<a href="#">新闻</a>
<a href="#">娱乐</a>
</body>
</html>
css代码如下:
a {
text-align:center;
border:1px solid blue;
display:inline-block;
150px;
height:100px;
background:pink;
line-height:100px;
text-decoration:none;
}
a:hover {
background:red;
}