富贵资源网 Design By www.hznty.com
HTML代码:
复制代码 代码如下:
<body>
<div style="overflow:hidden;width:360px;height:225px;position:absolute;top:30px;" id="div">
<div style="width: 360px; height: 900px; position: relative;" id="imgCon">
<img src="/UploadFiles/2021-04-02/1.jpg"><img src="img/2.jpg"><img src="/UploadFiles/2021-04-02/3.jpg"><img src="img/1a.jpg"><img src="/UploadFiles/2021-04-02/1.jpg"></div>
</div>
<div class="box" num="0" id="box0" style="color:red;">1</div>
<div class="box" num="1" id="box1">2</div>
<div class="box" num="2" id="box2">3</div>
<div class="box" num="3" id="box3">4</div>
</body>

JS代码:
复制代码 代码如下:
<script type="text/javascript">
$(document).ready(function(){
$("#box0").click(function(){
//$("#imgCon").slideUp(4200);
$("#imgCon").animate({top:'-225px'},"slow");
});
$("#box1").click(function(){
$("#imgCon").animate({top:'-450px'},"slow");
});
$("#box2").click(function(){
$("#imgCon").animate({top:'-675px'},"slow");
});
$("#box3").click(function(){
$("#imgCon").animate({top:'-900px'},"slow");
});
});
</script>

CSS:代码:
复制代码 代码如下:
<style type="text/css">
.box{
width:40px;
height:20px;
border:1px solid #000;
float:left;
cursor:pointer;
}
#imgCon img{
display:block;
padding:0;
margin:0;
width:360px;
height:225px;
}
</style>
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com