html,css鼠标停留表格一行颜色随着变化之实现

来源:互联网 发布:市场进入策略一手数据 编辑:程序博客网 时间:2024/05/21 12:39

首先需给鼠标添加相应的动作:如<tr onmouseover="this.style.backgroundColor='#5599ff'" onmouseout="this.style.backgroundColor='#f5f5f5'"bgColor=#f5f5f5>

,当鼠标停留一行时,这一行的颜色随着鼠标停留,移动而改变。上处如无变化,需加入<thead >。

参考代码:

<thead >
<tr onmouseover="this.style.backgroundColor='#5599ff'" 
  onmouseout="this.style.backgroundColor='#f5f5f5'"bgColor=#f5f5f5>
<th>
</th>
<th>借款期限</th>
<th>月综合利率</th>
<th>月还款额</th>
<th>总还款额</th>
</tr>

</thead>

0 0
原创粉丝点击