zoukankan      html  css  js  c++  java
  • css3旋转小样例

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            body{
                background-color: #000;
            }
            .dibu {
                 500px;
                height: 500px;
                /* background-color: #fff; */
                margin: 100px auto;
                border-radius: 50%;
                border: 20px solid #aca;
                position: relative;
                animation: xuanzhuan 2s linear infinite;
     
            }
            .dibu::before{
                content: '';
                display: block;
                 500px;
                height: 500px;
                border-radius: 50%;
                border-top: 20px solid rgb(230, 255, 2);
                border-left: 20px solid rgb(230, 255, 2);
                border-right: 20px solid transparent;
                border-bottom: 20px solid transparent;
                position: absolute;
                top: -20px;
                left: -20px;
              
            }
            .r{
                 250px;
                height: 20px;
                /* background-color:rgb(230, 255, 2); */
                background-color: transparent;
                position: absolute;
                top: 241px;
                transform: rotate(136deg);           
                transform-origin: right;
                
            }
            .r::before{
                content: '';
                display: block;
                background-color:rgb(230, 255, 2);
                 50px;
                height: 50px;
                border-radius: 50%;
                position: absolute;
                top:-14px;
                left: -34px;
            }
            @keyframes xuanzhuan {
            
             0%{transform: rotate(0deg);}  
            100%{ transform: rotate(360deg);}   
            
        }
        </style>
    </head>
    
    <body>
        <!-- 固定大圈 -->
        <div class="dibu">
            <div class="r"></div>
        </div>
    </body>
    
    </html>
    

  • 相关阅读:
    Python os 方法指南
    网站后台500错误分析
    HTML中的meta标签常用属性及其作用总结
    Python线程理论
    python之struct详解
    python之路——初识面向对象
    configparser和hashlib模块
    logging模块
    re模块
    pickle,shelve,json模块
  • 原文地址:https://www.cnblogs.com/wszzj/p/14109518.html
Copyright © 2011-2022 走看看