zoukankan      html  css  js  c++  java
  • 3d旋转

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset=UTF-8>
    <title></title>
    
    </head>
    <body>
    <style type="text/css">
    #rotate3D {
        width: 80px;
        height: 70px;
        color: white;
        position: relative;
        font-weight: bold;
        font-size: 15px;
        padding: 10px;
        float: left;
        margin-right: 50px;
        border-radius: 5px;
        border: 1px solid #000000;
        background: red;
        margin: 10px;
    }
    </style>
    <script type="text/javascript">
    
    
    var x,y,n=0,ny=0,rotINT,rotYINT
    
    function rotateYDIV()
    {
    y=document.getElementById("rotate3D")
    clearInterval(rotYINT)
    rotYINT=setInterval("startYRotate()",5)
    }
    
    function startYRotate()
    {
    ny=ny+5
    y.style.transform="rotateY(" + ny + "deg)"
    y.style.webkitTransform="rotateY(" + ny + "deg)"
    y.style.OTransform="rotateY(" + ny + "deg)"
    y.style.MozTransform="rotateY(" + ny + "deg)"
    if (ny==530 || ny>=1080)
        {
        clearInterval(rotYINT)
        if (ny>=1080){ny=0}
        }
    }
    
    
    </script>
    
    <div onmouseover="rotateYDIV()" id="rotate3D" style="transform: rotateY(0deg);">3D rotate</div>
    
    </body>
    </html>
  • 相关阅读:
    BZOJ 1176: [Balkan2007]Mokia
    BZOJ 4034: [HAOI2015]T2
    BZOJ 4031: [HEOI2015]小Z的房间
    BZOJ 4128: Matrix
    JSP学习-08-JavaBean
    JSP学习-标准标签库
    电影剧本写作基础
    JSP学习-09-自定义标签
    JSP学习-07Cookie 与Session
    JSP学习-06过滤器
  • 原文地址:https://www.cnblogs.com/junyi-bk/p/11328985.html
Copyright © 2011-2022 走看看