使用js使几个div进行切换,主要点击左右两个图片是四个div一次向左或右切换
css//.photo{margin-right:9px;margin-top:10px;margin-bottom:10px;float:left;width:173p...
css//
.photo{
margin-right: 9px;
margin-top: 10px;
margin-bottom: 10px;
float: left;
width: 173px;
height: 120px;
}
<div class="photo0">
<div class="change"><a href=""><img src="./images/zuo.png" alt="" /></a></div>
<div class="photo"><img src="./images/img2.png" alt="" width="173px";heght="120px";/></div>
<div class="photo"><img src="./images/img3.png" alt="" width="173px";heght="120px";/></div>
<div class="photo"><img src="./images/img4.png" alt="" width="173px";heght="120px";/></div>
<div class="photo"><img src="./images/img5.png" alt="" width="173px";heght="120px";/></div>
<div class="change"><a href=""><img src="./images/you.png" alt="" /></a></div>
</div> 展开
.photo{
margin-right: 9px;
margin-top: 10px;
margin-bottom: 10px;
float: left;
width: 173px;
height: 120px;
}
<div class="photo0">
<div class="change"><a href=""><img src="./images/zuo.png" alt="" /></a></div>
<div class="photo"><img src="./images/img2.png" alt="" width="173px";heght="120px";/></div>
<div class="photo"><img src="./images/img3.png" alt="" width="173px";heght="120px";/></div>
<div class="photo"><img src="./images/img4.png" alt="" width="173px";heght="120px";/></div>
<div class="photo"><img src="./images/img5.png" alt="" width="173px";heght="120px";/></div>
<div class="change"><a href=""><img src="./images/you.png" alt="" /></a></div>
</div> 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏10(财富值+成长值)
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询