2009/06/10 10:45

css 마우스 오버(behavior: expression)

CSS 자바스크립트 처리를 위해 사용

behavior: expression



<style>
/* IE6 이외 브라우저 */
.layer {
 padding:30px;
 text-align:center;
}
.layer:hover,
.layerOver  { /* layerOver 마우스 오버시 디자인 */
 border:3px solid blue;
}
/* IE6과 그 이하의 브라우저 */
.layer  {
 behavior: expression(
  this.onmouseover = new Function("this.className += ' layerOver';"),
  this.onmouseout = new Function("this.className = this.className.replace(' layerOver', '');"),
  this.style.behavior = null
 );
}
</style>
<div class="layer">영역의 테두리 변경<div>
Trackback 0 Comment 0