<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script language="javascript"> function mo() { var x=event.clientX,y=event.clientY; //alert(ccc.offsetHeight+","+ccc.style.marginBottom); if(document.getElementById&&!document.all) obj=document.getElementById("sh"); if(document.all) obj=document.all.sh; if(document.layers) obj=document.layers.sh; if(obj.style.visibility=='hidden') { var width=10; var height=20; obj.style.left=x+'px'; obj.style.top=y+'px'; obj.style.visibility='visible'; var timer = setInterval(function () { width=width+10; height=height+20; if(height<200) { obj.style.width=width+'px'; obj.style.height=height+'px'; } else{ clearInterval(timer);obj.innerHTML='哈哈哈哈哈哈哈哈哈哈哈哈';} },1); } else { var width=100; var height=200; obj.innerHTML=''; var timer = setInterval(function () { width=width-10; height=height-20; if(height>0) { obj.style.width=width+'px'; obj.style.height=height+'px'; } else{ clearInterval(timer);obj.style.visibility='hidden';} },1); } } </script> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>js牛X的信息提示效果</title>
<style type="text/css"> <!-- body { margin-top: 200px; } --> </style></head>
<body> <div id="sh" style="left:500px; top:300px; width:200px; height:50px; position:absolute; visibility: hidden; filter: progid:DXImageTransform.Microsoft.Shadow (Color=#333333,Direction=130,strength=2) alpha(opacity=30) BlendTrans(duration=1); border:solid #999999 1px;z-index:1"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><span style="color:#000000">http://www.10i.com.cn</span> </td> </tr> </table> </div> <table width="250" border="0" cellspacing="0" cellpadding="0" id="ccc"> <tr> <td height="25"><a href="http://www.10i.com.cn" target="_blank" onmouseover="mo()" onmouseout="mo()">http://www.10i.com.cn</a></td> </tr> </table> </body> </html>
|