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

清新兼容性好的水平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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>清新兼容性好的水平CSS菜单</title>
<style type="text/css">
body {font-size:76%;} 
#pro7 ul {margin:0 auto; padding:0; list-style:none; display:table; white-space:nowrap; list-style:none; height:2em; position:relative; font-size:0.9em;}
#pro7 li {display:table-cell; margin:0; padding:0;}
#pro7 li a {display:block; float:left; height:2em; line-height:2em; color:#333; text-decoration:none; font-family:arial, verdana, sans-serif; font-weight:bold; text-align:center; padding:0 0 0 12px; cursor:pointer; background:url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_0a.gif) no-repeat;}
#pro7 li a b {float:left; display:block; padding:0 12px 0 0; background:url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_0b.gif) no-repeat right top;}
#pro7 li.current a {color:#000; background:url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_2a.gif) no-repeat;}
#pro7 li.current a b {background:url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_2b.gif) no-repeat right top;}
#pro7 li a:hover {color:#000; background: url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_1a.gif) no-repeat;}
#pro7 li a:hover b {background:url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_1b.gif) no-repeat right top;}
#pro7 li.current a:hover {color:#000; background: url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_2a.gif) no-repeat; cursor:default;}
#pro7 li.current a:hover b {background:url(http://www.zzzyk.com/jscss/demoimg/200905/pro_seven_2b.gif) no-repeat right top;}

</style>

<!--[if IE]>
<style type="text/css">
#pro7 ul {display:inline-block;}
#pro7 ul {display:inline;}
#pro7 ul li {float:left;}
#pro7 {text-align:center;}
</style>
<![endif]-->

</head>

<body>
<div id="pro7">
<ul>
<li><a href="/jscss/"><b>Home</b></a></li>
<li><a href="/jscss/"><b>Products</b></a></li>
<li><a href="/jscss/"><b>网页特效</b></a></li>
<li><a href="/jscss/"><b>Search</b></a></li>
</ul>
</div>
</body>
</html>

上一个:列表、排行专用的灰、红滑动门菜单
下一个:三种简洁的Tab网页选项卡

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,