

要写js 动态改变class 然后再给class写样式~
 CSS: 
 .MM { 
 width: 182px; 
 margin: 0px; 
 padding: 0px; 
 left: 0px; 
 top: 0px; 
 right: 0px; 
 bottom: 0px; 
 clip: rect(0px,0px,0px,0px); 
 } 
 .MM a:link { 
 font-family: Arial, Helvetica, sans-serif; 
 font-size: 12px; 
 line-height: 26px; 
 color: #333333; 
 background-image: url(images/menu_bg1.gif); 
 background-repeat: no-repeat; 
 height: 26px; 
 width: 182px; 
 display: block; 
 text-align: center; 
 margin: 0px; 
 padding: 0px; 
 overflow: hidden; 
 text-decoration: none; 
 } 
 .MM a:visited { 
 font-family: Arial, Helvetica, sans-serif; 
 font-size: 12px; 
 line-height: 26px; 
 color: #333333; 
 background-image: url(images/menu_bg1.gif); 
 background-repeat: no-repeat; 
 display: block; 
 text-align: center; 
 margin: 0px; 
 padding: 0px; 
 height: 26px; 
 width: 182px; 
 text-decoration: none; 
 } 
 
 .MM a:hover { 
 font-family: Arial, Helvetica, sans-serif; 
 font-size: 12px; 
 line-height: 26px; 
 font-weight: bold; 
 color: #006600; 
 background-image: url(images/menu_bg2.gif); 
 background-repeat: no-repeat; 
 text-align: center; 
 display: block; 
 margin: 0px; 
 padding: 0px; 
 height: 26px; 
 width: 182px; 
 text-decoration: none; 
 } 
 
 .MM a:active { 
 font-family: Arial, Helvetica, sans-serif; 
 font-size: 12px; 
 line-height: 26px; 
 color: #333333; 
 background-image: url(images/menu_bg2.gif); 
 background-repeat: no-repeat; 
 height: 26px; 
 width: 182px; 
 display: block; 
 text-align: center; 
 margin: 0px; 
 padding: 0px; 
 overflow: hidden; 
 text-decoration: none; 
 } 
 
 页面: 
 
 
 页面 
 
 
把上面的#menu 换成.MM
改了,试了不行。
 
  
 
|  | 
