不知道这样写合不合规矩,可是效果能实现,请问有没有问题
<script type="text/javascript">
var run = 1;
function next(){
if(run == 5){ return; }
var box = document.getElementById("page"+run);
box.style.webkitTransform = "rotateX(-90deg)";
run ++;
var box = document.getElementById("page"+run);
box.style.webkitTransform="rotateX(0deg)";
}
function prev(){
if(run == 1){ return; }
var box =document.getElementById("page"+run);
box.style.webkitTransform = "rotateX(90deg)";
run --;
var box =document.getElementById("page"+run);
box.style.webkitTransform = "rotateX(0deg)";
}
</script>