<div id="box"> <div id="picture" style="left: -600px;"> <img src="img/5.jpg"/><!--0--> <img src="img/1.jpg"/><!-- -600 --><!--默认--> <img src="img/2.jpg"/><!-- -1200 --> <img src="img/3.jpg"/><!--1800--> <img src="img/4.jpg"/><!--2400--> <img src="img/5.jpg"/> <img src="img/1.jpg"/> </div> <div id="button"> <a href="#" class="left_a"><img src="img/箭头左.png"/></a> <a href="#" class="right_a"><img src="img/箭头右.png"/></a> </div> </div>
$(document).ready(function(){ $(".left_a").mousedown(function(){ ? }) $('.right_a').mousedown(function(){ ? }) })
*{ margin: 0; padding: 0; } #box{ width: 600px; height: 400px; border: 2px solid black; overflow: hidden; position: relative; top: 100px; left: 100px; } #picture{ width: 4200px; position: absolute; } img{ float: left; } #button{ width: 600px; position: absolute; top: 170px; left: 0px; } .left_a{ float: left; margin: 0 20px; } .right_a{ float: right; margin: 0 20px; } #box:hover img{ background-color: rgba(0,0,0,0.5); }
慕妹5461943
林逸舟丶
Hardy丶
FSYu
Gotta
林逸舟丶
相关分类