当前位置:首页 > 设计在线 > 网页设计 > CSS/Xhtml > 透明CSS菜单制作教程

透明CSS菜单制作教程

点击次数:21 次 发布日期:2008-11-21 23:48:58 作者:源代码网
源代码网推荐

透明的CSS菜单

兼容性:IE5.5+、Opera、Frefox、Netscape

CSS代码如下:

body{
     font: 80% Arial,sans-serif;
     background: #666;
}
#nav{
     width: 170px;
     background: url(navbg.gif) bottom;
     list-style-type: none;
     margin: 0;
     padding: 0;
}
#nav a{
     display: block;
     width: 170px;
     line-height: 25px;
     text-decoration: none;
     color: #333;
     text-indent: 10px;
     font-weight: bold;
     background: url(http://edu.cnzz.cn/NewsInfo/nav2.png);
}
#nav a:hover{
     background: none;
     color: #999;
}

用if调入对ie的CSS控制:

<!--[if gte IE 5.5]>
<style type="text/css">
#nav a{background: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod="scale", src="http://edu.cnzz.cn/NewsInfo/nav2.png")}
#nav a:hover{filter: none}
</style>
<![endif]--> 

源代码网供稿.
网友评论 (0)
会员中心
设计在线
本站推荐
设计在线之精华