Menu

테이블에 MouseOver효과

2016. 6. 3. 00:37

안개핑 Html & Css

 

 

 

 

 

<table width="300" border="1" cellspacing="0" cellpadding="3" bordercolordark="#000000" bordercolorlight="#999999" align="center">

<tr><td onMouseOver=this.style.backgroundColor="#ffcc00" onMouseOut=this.style.backgroundColor=""> </td>

<td onMouseOver=this.style.backgroundColor="#eeeeee" onMouseOut=this.style.backgroundColor=""> </td></tr>

<tr><td onMouseOver=this.style.backgroundColor="#ffcc00" onMouseOut=this.style.backgroundColor="">

<td onMouseOver=this.style.backgroundColor="ff0000" onMouseOut=this.style.backgroundColor="">

</tr>

</table>

onMouseOver=this.style.backgroundColor="#ffcc00" --- 마우스가 올라갔을때

onMouseOut=this.style.backgroundColor="" --- 마우스가 올라갔다가 빠졌을때

backgroundColor="ffcc00" 이것은 색상 입니다

backgroundColor="" 마우스가 빠졌을때는 왜 아무색상이 없냐구요 ?

아무것도 안적어주면 예제에서 보듯이 원래의 색으로 돌아가버리는거죠 !