有a,b,c,d,e....多个栏目导航,当点击a栏目时,a链接为粗体;
当点击b栏目时,b栏目为粗体,其他栏目字体为变回正常;
用什么方法实现?
//html 代码
//调用 css
<link rel="stylesheet" type="text/css" href="css.css" />
<a href="#" class="menu2" onMouseOver="this.className='menu1'" onMouseOut="this.className='menu2'">百度</a>
<a href="#" class="menu2" onMouseOver="this.className='menu1'" onMouseOut="this.className='menu2'">谷歌</a>
////////////////////////////
css.css代码:
.menu1
{
width:120px;
height:auto;
font-weight:bold
}
.menu2
{
width:120px;
height:18px;
} 从手机浏览器访问《生活宝典》 |