求指教,为啥我做的没效果呀
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
#testBox{
-webkit-perspective:500;
-webkit-perspective-origin:50% 50%;
}
#wrrap{
-webkit-transform-style:preserve-3d;
width:300px;
height:300px;
position: relative;
margin: 50px auto;
}
.num{
width: 300px;
height: 300px;
background-color: black;
color: white;
font-size: 200px;
position: absolute;
line-height: 300px;
text-align:center;
-webkit-transform-origin:bottom;
-webkit-transition: -webkit-transform 1s linear;
}
#num1{
-webkit-transform:rotateX(0deg);
}
#num2,#num3,#num4{
-webkit-transform:rotateX(90deg);
}
.op{
text-align:center;
margin:0 auto;
}
</style>
<script type="text/javascript">
var page=1;
function next(){
var dqy=document.getElementbyId("num"+page);
dqy.style.webkitTransform="rotateX(-90deg)";
page ++;
var xyy=document.getElementbyId("num"+page);
xyy.style.webkitTransform="rotateX(0deg)"; }
function previous(){
var dqy=document.getElementbyId("num"+page);
dqy.style.webkitTransform="rotateX(90deg)";
page --;
var qyy=document.getElementbyId("num"+page);
qyy.style.webkitTransform="rotateX(0deg)"; }
</script>
</head>
<body>
<div id="testBox">
<div id="wrrap">
<div id="num1">1</div>
<div id="num2">2</div>
<div id="num3">3</div>
<div id="num4">4</div>
</div>
</div>
<div>
<a href="javascript:next()">next</a> <a href="javascript:previous()">previous</a>
</div>
</body>
</html>