DIV 类似 hover 悬停效果 鼠标移动上去变化

Hi
 1 <style type="text/css">
2 <!--
3 .banbu1,.banbu2{
4 width:100px;
5 height:100px
6 }
7 .banbu1 {
8 background:#CCC;
9
10 }
11 .banbu2{
12 background:#FF0000;
13
14 }
15 -->
16 </style>
17 </head>
18
19 <body>
20 <div class="banbu1" onmousemove="this.className='banbu2'" onmouseout="this.className='banbu1'">Hi</div>
posted @ 2011-10-26 22:50  banbu  阅读(4714)  评论(0编辑  收藏  举报