日期:2014-05-16 浏览次数:20387 次
<!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="textml; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> .box{ width:500px; height:300px; border:5px solid #00F;position:relative;} .left,.right{display:block;top:0;width:50px; height:300px;position:absolute; } .left span,.right span{position:relative;} .left{left:0;} .right{right:0;} .right{ float:right;} </style> <SCRIPT type=text/javascript src="http://d.lanrentuku.com/down/js/xiangce-848/js/jquery.js"></SCRIPT> <script type="text/javascript"> $(function(){ $(".left,.right").mouseover(function(){ $(this).html("<span><img src='images/leftbig.png'></span>") }).mouseout(function(){ $(this).html("") }) }) </script> </head> <body> <div class="box"> <div><img src="http://d.lanrentuku.com/down/js/xiangce-848/images/42813100.jpg" width="500" height="300" /></div> <a class="left" href="#"></a> <a class="right" href="#"></a> </div> </body>
<a class="left" href="#"> </a> <a class="right" href="#"> </a>
------解决方案--------------------
问题回答在
http://topic.csdn.net/u/20120904/20/0d77285f-7d03-44cd-b2f0-5881700dfbfd.html
上传了一个在线测试的代码demo,参照:http://jsfiddle.net/M3AXV/
------解决方案--------------------
.left,.right{display:block;top:0;width:50px; height:300px;position:absolute;background:url(about:blank)}