日期:2014-05-16 浏览次数:20408 次
<!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" /> <style> .tip li{float:left;width:100px;text-align:center;} .t{font-size:18px;height:25px;width:100px;position:absolute;} .t div{left:-999em} .t:hover div{color:#666;left:0px;top:25px;border:#ccc 1px solid;padding:5px 5px 3px 5px;background-color:#fff;width:166px;} </style> </head> <body> <div> <ul class="tip"> <li><div class="t"s=" http://www.baidu.com"p="123"f="12313212"><a class="link"href="1.html">测试qqqqqewer</a></div></li> <li><div class="t"s=" http://www.baidu.com"p="123"f="12313212"><a class="link"href="1.html">测试qq</a></div></li> <li><div class="t"s=" http://www.baidu.com"p="123"f="12313212"><a class="link"href="1.html">测试qqqq</a></div></li> </ul> </div> <script src="jq162.js"></script> <script> $(document).ready(function(){ $(".t","ul.tip").mouseover(function(){ var a =$(this),b=new Image(); setTimeout(function(){ var c =a.attr('s'); var d =a.attr('p'); var e =a.attr('f'); a.append('<div id="tooltip"style="font-size:12px;z-index:1000;position:absolute">简介:<a href="'+c+'">点击这里</a><br>人气:'+d+'<br>收藏:'+e+'次</div>'); a.unbind(); },1000); }); }); </script> </body> </html>
¥document