css3动画效果小结(推荐)

2020-04-28 07:18:59易采站长站整理

    </style>  
    <script>  
        window.onload=function(){   
            var tx = document.getElementById("tx");   
            var ty = document.getElementById("ty");   
            var tz = document.getElementById("tz");   
            var rx = document.getElementById("rx");   
            var ry = document.getElementById("ry");   
            var rz = document.getElementById("rz");   
            var box = document.getElementById("box");   
            tx.onclick=function(){   
                box.style.transform = "translateX(500px)";   
            };   
            ty.onclick=function(){   
                box.style.transform = "translateY(400px)"  
            };   
            rx.onclick=function(){   
                box.style.transform = "rotateX(30deg)"  
            };   
            ry.onclick=function(){   
                box.style.transform = "rotateY(30deg)"  
            };   
            rz.onclick=function(){   
                box.style.transform = "rotateZ(30deg)"