现在想实现这样一个效果:当把鼠标放在一个层上面,让该层加入一个css如:
.a
{
 border-color:Red;
 border-width:2px;
 border-style:double;        
}鼠标移开就将这个属性删除掉.

解决方案 »

  1.   

    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>Untitled Document</title>
    </head><body>
    <style type="text/css">
    .a 

    border-color:Red; 
    border-width:2px; 
    border-style:double;        

    </style><div style="width:100px;height:100px;background:blue;" onmouseover="this.className='a';" onmouseout="this.className='';"></div>
    </body>
    </html>