鼠标经过时背景变色的效果(小技巧)
<style type="text/css">
.cl1 {
background: olive
}
.cl2 {
background: white
}
}
</style>
<body>
<table>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
</table>
</body>
.cl1 {
background: olive
}
.cl2 {
background: white
}
}
</style>
<body>
<table>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
<tr onMouseover="this.className='cl1';" onMouseout="this.className='cl2'">
<td>aa</td>
<td>bb</td>
</tr>
</table>
</body>