<div class="codetitle"> <span><a style="CURSOR: pointer" data="38082" class="copybut" id="copybut38082" onclick="doCopy('code38082')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code38082"> <br>function refresh() { <br>var s = $(".box1"); <br>if (!s.is(":animated")) <br>$(".box1").animate({ marginLeft: "0px" }, "slow", function () { <br>$('.box1 img:first').before($('.box1 img:last')); <br>$(".box1").css("margin-left", "-206px"); <br>}); <br>} <br><div class="frame"><div class="box1"> <img src="img/001.png" alt=""><img src="img/002.png" alt=""><img src="img/003.png" alt=""><img src="img/004.png" alt=""> </div></div> <br><button type="button"><button type="button" onclick="refresh()">>></button> <br>.box1 <br>{ <br>width:1200px; <br>overflow:hidden; <br>margin-left:-206px; <br>} <br>.frame <br>{ <br>width:620px; <br>overflow:hidden; <br>} <br></button> </div> <br>图片宽度默认206px,没设定