CSS样式里使用JavaScript(onmouseover/onmouseout)

 在CSS里设置触碰事件。
.title{
  onmouseover: expression(onmouseover
= function (){ this .style.borderColor  = ' blue ' ; this .style.color = ' red ' ; this .style.backgroundColor  = ' #D4D6D0 ' });
  
  onmouseout: expression(onmouseout
= function (){ this .style.borderColor = '' ; this .style.color = '' ; this .style.backgroundColor  = '' });
  background
- color:#ECEDEB;
  }

你可能感兴趣的:(CSS)