zoukankan      html  css  js  c++  java
  • html css 旋转 圆

    <head runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
        <script src="Scripts/jquery-3.1.1.min.js"></script>

        <style type="text/css">
            .circleHome {
            }
            .circle {
                position:absolute;
                top:10px;
                left:10px;
                display: none;
                border-radius: 50%;
                height: 300px;
                300px;
                margin: 0;
                border:10px solid #ff0;
            }
            .circle2 {
                position: relative;
                top: 10px;
                left: 10px;
                display: block;
                border-radius: 50%;
                height: 300px;
                300px;
                margin: 0;
                border-top: 10px solid #f00;
                border-right: 10px solid #ff0;
                border-bottom: 10px solid #ff0;
                border-left: 10px solid #ff0;
            }
        </style>
        <script type="text/javascript">

            $(function () {
                var $elie = $(".circle2");// $(selectorForElementsToRotate);
                rotate(0);
                function rotate(degree) {

                    // For webkit browsers: e.g. Chrome
                    $elie.css({ WebkitTransform: 'rotate(' + degree + 'deg)' });
                    // For Mozilla browser: e.g. Firefox
                    $elie.css({ '-moz-transform': 'rotate(' + degree + 'deg)' });
                    // For Mozilla browser: e.g. IE
                    $elie.css({ 'transform': 'rotate(' + degree + 'deg)' });

                    // Animate rotation with a recursive call
                    setTimeout(function () { rotate(++degree); }, 1);
                }
            });

        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>111</div>
            <div class="circleHome">
                <div class="circle"></div>
                <div class="circle2"></div>
            </div>
            <div>222</div>
        </form>
    </body>
    </html> 

  • 相关阅读:
    5分钟带你了解Kafka的技术架构
    聊聊我的知识体系
    你分得清楚Maven的聚合和继承吗?
    为抖音而生的多闪,如何获取抖音的用户数据?
    消息中间件系列第3讲:使用消息队列需要考虑的几个问题
    消息中间件系列第2讲:如何进行消息队列选型?
    消息中间件系列第1讲:为什么要用消息队列?
    JVM规范系列开篇:为什么要读JVM规范?
    安全编码实践之三:身份验证和会话管理防御
    安全编码实践之二:跨站脚本攻击防御
  • 原文地址:https://www.cnblogs.com/loge/p/14985536.html
Copyright © 2011-2022 走看看