复制代码 代码如下:
.nav{height:40px; width: 100%;background: #E6E6E6;}
.nav ul li{float: left;list-style: none;margin-right: 20px;line-height: 40px;}
.nav ul li a{text-decoration: none; display: block;width: 60px; text-align: center;}
.onNav{font-weight: bold;color:#fff; background: #ccc;}
- 首页
- 博客
- 论坛
- 关于
- 联系
js部分:
复制代码 代码如下:
上面是一种方法,以下是另外一种:
复制代码 代码如下:



