<div class="wrap"> <!--photo-center负责旋转,平移--> <div class="photo photo_center photo_front" onclick="turn(this)" > <!--photo-wrap负责翻转--> <div class="photo-wrap"> <div class="side side-front"> <p class="image"><img src="images/1.jpg" alt=""></p> <p class="caption">环保靠大家</p> </div> <div class="side side-back"> <p class="desc">描述信息</p> </div> </div> </div>JS:<script type="text/javascript"> //1.翻面控制 function turn (elem){ var cls = elem.className; if(/photo_front/.text( cls ) ){ cls = cls.replace(/photo_front/,'photo_back') }else{ cls = cls.replace(/photo_back/,'photo_front') } return elem.className = cls; }</script>
添加回答
举报
0/150
提交
取消