当前位置:编程学习 > JS >>

鼠标移动到图片上或者表格上改变边框颜色的代码

鼠标移动到图片上的时候,改变边框颜色的纯css代码如下

.pic5
{
 border:3px double #9A8578;
}
a:hover .pic5
{
 border:3px double #cccccc;
}

鼠标移动到表格上,简单鼠标事件js改变边框颜色的代码:

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-style: solid; border-width: 1" bordercolor="#FF0000" width="300" id="AutoNumber1" height="100"
onmouseover="this.style.borderColor='#00FF00';"
onmouseout="this.style.borderColor='#FF0000';" align="center">
  <tr>
    <td>动上来看看吧</td>
  </tr>
</table>

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,