dw用div制作导航栏的步骤 把鼠标放在那里有背景颜色改变的
发布网友
发布时间:2022-04-26 04:03
我来回答
共1个回答
热心网友
时间:2022-06-20 16:33
我写了一个例子,你看看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type="text/css">
body,ul{padding:0px; margin:0px;}
ul li{list-style:none;}
.nav{width:200px; height:auto;}
.nav ul li{width:200px; height:24px; float:left; line-height:24px; text-align:center; font-size:12px; margin-top:1px;}
.nav ul li a{width:200px; height:24px; background-color:#eeeeee; color:#000; text-decoration:none; display:block;}
.nav ul li a:hover{width:200px; height:24px; background-color:#CCC;}
</style>
<body>
<div class="nav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Proct</a></li>
<li><a href="#">About us</a></li>
</ul>
</div>
</body>
</html>