码迷,mamicode.com
首页 > Web开发 > 详细

用CSS怎样实现鼠标移上去背景颜色变色 onmouseover、onmouseout

时间:2014-07-26 02:26:16      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:onmouseover   onmouseout   鼠标移动背景变色   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
table {
	border-collapse:collapse;
}
td {
	border:#000 solid 1px;
}
</style>
</head>

<body>
<table width="600" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td onmouseover="this.style.background=‘#666666‘" onmouseout="this.style.background=‘‘"> </td>
    <td onmouseover="this.style.background=‘#666666‘" onmouseout="this.style.background=‘‘"> </td>
  </tr>
  <tr>
    <td onmouseover="this.style.background=‘#666666‘" onmouseout="this.style.background=‘‘"> </td>
    <td onmouseover="this.style.background=‘#666666‘" onmouseout="this.style.background=‘‘"> </td>
  </tr>
</table>
</body>
</html>

用CSS怎样实现鼠标移上去背景颜色变色 onmouseover、onmouseout,布布扣,bubuko.com

用CSS怎样实现鼠标移上去背景颜色变色 onmouseover、onmouseout

标签:onmouseover   onmouseout   鼠标移动背景变色   

原文地址:http://blog.csdn.net/zsj523/article/details/38121987

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!