dw用div制作导航栏的步骤 把鼠标放在那里有背景颜色改变的

如题所述

第1个回答  推荐于2016-05-14
我写了一个例子,你看看

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<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="#">Product</a></li>
<li><a href="#">About us</a></li>
</ul>
</div>
</body>
</html>本回答被提问者采纳

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网