<div class="codetitle"> <span><a style="CURSOR: pointer" data="75143" class="copybut" id="copybut75143" onclick="doCopy('code75143')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code75143"> <br>以下为程序代码:<!DOCTYPE html/> <br><head> <br><script type="text/javascript" src="http://www.w3school.com.cn/jquery/jquery.js"></script> <br><script type="text/javascript"> <br>$(function() { <br>$(".v").mouseover(function() { <br>var x = $("<div class='vs'></div>"); <br>x.appendTo($('body')); <br>x.css({ <br>width : $(this).width() - 6, <br>height : $(this).height() - 6, <br>left : $(this).offset().left, <br>top : $(this).offset().top <br>}); <br>$($.browser.msie ? this : x).mouseout(function(){ <br>x.remove(); <br>}); <br>}); <br>}); <br></script> <br><style> <br>.vs {z-index:1000;position:absolute;border:3px solid red;} <br></style> <br></head> <br><body> <br><a href="#"><img src="http://img2.bdstatic.com/img/image/774730e0cf3d7ca7bcb7a7b223ebc096b63f624a89b.jpg" border="0" class="v" /></a> <br><a href="#"><img src="http://img2.bdstatic.com/img/image/774730e0cf3d7ca7bcb7a7b223ebc096b63f624a89b.jpg" border="0" /></a> <br><a href="#"><img src="http://img2.bdstatic.com/img/image/774730e0cf3d7ca7bcb7a7b223ebc096b63f624a89b.jpg" border="0" class="v" /></a> <br></body> <br></html> <br> </div> <br>点击查看演示:http://biyuan.tk/u/upload/201311131123292656.html