| 用DHTML做的一个菜单特效 |
| 作者/sunnie 时间/2006-6-14 14:48:00 类别/Design 查看/ |
| 标签:综合 娱乐 sunnie Design |
|
源码: <!--样式表部分--> <style type=text/css> .menu td{font-size:12px;color:white;font-weight:bold;background:#336699;border:1px solid #336699;filter:blendtrans(duration=0.5);cursor:hand;text-align:center} </style> <!--脚本定义部分--> <script language=javascript type=text/javascript> function showFilter(obj){ var tds=obj.getElementsByTagName("td"); for(var i=0;i<tds.length;i++){ with(tds){ onmouseover=function(){ with(this){ filters[0].apply(); style.color='black'; style.border='1px solid white'; style.background='#66CCFF'; filters[0].play(); } } onmouseout=function(){ with(this){ filters[0].apply(); style.color='white'; style.border='1px solid #336699'; style.background='#336699'; filters[0].play(); } } } } } </script> <!--BODY部分--> <table cellspacing=4 cellpadding=1 bgColor=#336699 border=0 class=menu width=100 id=xmenu> <tr><td>0128论坛</td></tr> <tr><td>例子二</td></tr> <tr><td>例子三</td></tr> <tr><td>例子四</td></tr> <tr><td>例子五</td></tr> <tr><td>例子六</td></tr> </table> <script>showFilter(xmenu); //里面就的xmenu就是表格的ID号此函数可到处调用</script> |
| 查看该用户更多文章>> |