当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > DIV+CSS制作的个性水平导航菜单实例

CSS样式表
50个强大璀璨的CSS3/JS技术运用实例
table建站,XHTML建站和DIV建站的不同
根据W3C的CSS3草案翻译的CSS3参考手册
RoundedCornr:生成圆角图片的好用的简单工具
CSS教程:彻底了解haslayout
CSS3的简单又实用的3个属性
CSS教程:-moz-inline-box和-moz-inline-stack
css3阴影属性box-shadow注意事项
css3文本阴影属性text-shadow说明
CSS3的border-radius(圆角)
border边框属性在浏览器中的渲染方式
CSS属性:text-shadow,box-shadow,border-radius
再论清除浮动的空DIV方法
YUI网页布局:自适应宽度的输入框
学习web标准:Web标准中的特殊字符
优化浏览器渲染:将样式表放在页面顶部
优化浏览器渲染:指定图片尺寸
优化浏览器渲染:避免CSS expressions
CSS3 Please:在线生成跨浏览器的CSS3代码
CSS实例教程:制作漂亮的网页表单

CSS样式表 中的 DIV+CSS制作的个性水平导航菜单实例


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-13   浏览: 32 ::
收藏到网摘: n/a

先看下效果:

DIV+CSS制作的个性水平导航菜单实例_软晨学习网ruanchen.com整理

 

CSS样式代码:

以下为引用的内容:
#pointermenu{
border-top: 7px solid black; /*optional border across top*/
margin: 0;
padding: 0;
}

#pointermenu ul{
margin: 0;
margin-left: 15px; /*menu offset from left edge of window*/
float: left;
padding-left: 10px;
font: 12px 宋体;
background-color: black;
background: black url(../images/leftround.gif) bottom left no-repeat; /*optional left round corner*/
}

* html #pointermenu ul{ /*IE6 only rule. Decrease ul left margin and add 1em bottom margin*/
margin-bottom: 1em;
margin-left: 7px; /*menu offset from left edge of window in IE*/
}

#pointermenu ul li{
display: inline;
}


#pointermenu ul li a{
float: left;
color: white;
font-weight: ;
padding: 2px 11px 7px 7px;
text-decoration: none;
background: url(../images/bbbbb.gif) bottom center no-repeat;
}

#pointermenu ul li a:visited{
color: white;
}


#pointermenu ul li a:hover, #pointermenu ul li a#selected{ /*hover and selected link*/
color: white;
background-color: darkred;
}

#pointermenu ul li a#rightcorner{
padding-right: 0;
padding-left: 8px;
background: url(../images/rightround.gif) bottom right no-repeat; /*optional right round corner*/
}

HTML完整

以下为引用的内容:

<!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" lang="gb2312" xml:lang="gb2312">
<head>
<title>站酷CSS代码演示</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="css/css.css" _fcksavedurl=""css/css.css"" _fcksavedurl=""css/css.css"" />
</head>

<body>

<div id="pointermenu">
<ul>
<li><a href="#">主 页</a></li>
<li><a href="#">自定菜单</a></li>
<li><a href="#" id="selected">自定菜单</a></li>
<li><a href="#">自定菜单</a></li>
<li><a href="#">自定菜单</a></li>
<li><a href="#">自定菜单</a></li>
<li><a href="#">自定菜单</a></li>
<li><a href="#" id="rightcorner"> </a></li>
</ul>
</div>
<br style="clear: left" />
</body>

</html>

最后提供打包下载:/upload/tech/20091013/20091013012513_1068c6e4c8051cfd4e9ea8072e3189e2.rar