像电灯开关一样的竖直菜单
像电灯开关一样的竖直菜单,只所以说像电灯开关,就是指它的整体的外形像开关,完全CSS代码实现,兼容性也不错。
像电灯开关一样的竖直菜单,只所以说像电灯开关,就是指它的整体的外形像开关,完全CSS代码实现,兼容性也不错。
答案:<!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=gb2312" />
<title>纯CSS开关导航菜单</title>
<style type="text/css">
#menu {width:120px; border:1px solid #000; padding:25px; background:#bcb; margin:0 auto;}
* html #menu {width:172px; w\idth:120px;}
#menu dt {border:2px solid #fff; border-color:#687 #ded #ded #687; text-align:center; background:#fff; padding:3px 0; margin:7px 0; font-weight:bold; color:#900;}
#menu dd {padding:0; margin:0 0 4px 0;}
#menu .aa {display:block; padding:0; margin:0; background:#894; border:1px solid #000;}
#menu .bb {display:block; padding:1px 0 1px 0;; margin:0 0 6px 0; background:#cd9; border-bottom:1px solid #dea; text-align:center;}
#menu div {border:2px solid #fff; border-color:#687 #ded #ded #687;}
#menu a, #menu a:visited {display:block;width:100%;text-decoration:none; color:#900;}
#menu a:hover {color:#000; background:#bc8;}
#menu a:hover .bb {background:#bc8; margin:0 0 2px 0; padding:3px 0 3px 0; border-bottom:1px solid #ab6;}
#menu .aa {height:1%;}
* html #menu a:hover {
cursor:pointer;
display:inline;
text-indent:1px;
voice-family: ""}""
voice-family:inherit;
text-indent:0;
}
html>#menu a:hover {
text-indent:0;
}
</style>
</head>
<body>
<dl id="menu">
<dt>Start导航…</dt>
<dd><div class="cc"><a href="#"><span class="aa"><span class="bb">Paul Cezanne</span></span></a></div></dd>
<dd><div class="cc"><a href="#"><span class="aa"><span class="bb">Henri Matisse</span></span></a></div></dd>
<dd><div class="cc"><a href="#"><span class="aa"><span class="bb">William Turner</span></span></a></div></dd>
<dd><div class="cc"><a href="#"><span class="aa"><span class="bb">Claude Monet</span></span></a></div></dd>
</dl>
</body>
</html>
上一个:简约风格很多人会喜欢的纯CSS导航栏
下一个:CSS滑动门,兼容性非常好