当前位置:编程学习 > JS >>

蓝绿背景切换的漂亮CSS菜单

鼠标滑过更换背景的CSS菜单,蓝色与绿色结合,完美的色调搭配,相信看了后不会让你失望,用到了几个背景图片,请自行下载。
答案: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>经典漂亮的CSS菜单</title>
<style type="text/css">
.menu4 {padding:0 0 0 1em; margin:0; list-style:none; height:35px; background:url(/jscss/demoimg/200905/pro_four0.gif);}
.menu4 li {float:left;}
.menu4 li a {display:block; float:left; height:35px; line-height:33px; color:#aaa; text-decoration:none; font-family:arial, verdana, sans-serif; text-align:center; padding:0 0 0 14px; cursor:pointer; font-size:11px;}
.menu4 li a b {float:left; display:block; padding:0 28px 0 14px;}
.menu4 li.current a {color:#fff; background:url(http://www.zzzyk.com/jscss/demoimg/200905/pro_four2.gif);}
.menu4 li.current a b {background:url(/jscss/demoimg/200905/pro_four2.gif) no-repeat right top;}
.menu4 li a:hover {color:#fff; background: url(/jscss/demoimg/200905/pro_four1.gif);}
.menu4 li a:hover b {background:url(/jscss/demoimg/200905/pro_four1.gif) no-repeat right top;}
.menu4 li.current a:hover {color:#fff; background: url(/jscss/demoimg/200905/pro_four2.gif); cursor:default;}
.menu4 li.current a:hover b {background:url(/jscss/demoimg/200905/pro_four2.gif) no-repeat right top;}

</style>
</head>

<body>

<ul class="menu4">
<li><a href="/"><b>首页</b></a></li>
<li><a href="/"><b>更新日志</b></a></li>
<li class="current"><a href="/"><b>热点排行</b></a></li>
<li><a href="/"><b>给我留言</b></a></li>
<li><a href="/"><b>我是谁?</b></a></li>
<li><a href="/"><b>欢迎合作</b></a></li>

</ul>

</body>
</html>

上一个:可重复使用的简洁Tab选项卡
下一个:又一竖向简洁Tab网页选项卡

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,