• 今天学习css一些动画效果


    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>银河系</title>
    <link rel="stylesheet" type="text/css" href="css/xuanzhuan.css">
    </head>
    <body>
    <div id="p">
    <div id="o">
    <div id="i">
    <div id="sun">太阳
    <div id="earth">地球

    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>

    *{
    margin:0px;
    padding:0px;
    }
    body{
    color:#ccc;
    background:#71BADD;
    }
    #p{
    margin:100px auto;
    500px;
    height:500px;
    border:2px dashed red;
    border-radius:250px;
    display:flex;
    justify-content:center;
    align-items:center;
    }
    /*
    #i{
    margin:50px auto;
    300px;
    height:300px;
    border:2px dashed #FF34B3;
    border-radius:150px;
    }
    150px 250px 150px


    #o{
    margin:100px auto;
    300px;
    height:300px;
    border:2px dashed blue;
    border-radius:150px;
    }
    */
    #sun{
    line-height:100px;
    text-align:center;
    margin:230px auto;
    100px;
    height:100px;
    border:2px solid #F6CC35;
    border-radius:50px;
    background-color:red;
    animation: sunRotate 2s infinite;
    }
    @keyframes sunRotate{
    0%{
    transform:rotate(1turn);
    }
    }
    #earth{
    color:blue;
    line-height:50px;
    text-align:center;
    50px;
    height:50px;
    border:2px solid #FF34B3;
    border-radius:25px;
    position:absolute;
    top:280px;
    left:calc(50% - 40px);
    animation: earthRotate 2s infinite;
    transform-origin:25px 25px;
    }
    /*
    @keyframes earthRotate{
    0%{
    transform:rotate(1turn);
    }
    }

    position:absolute;
    *position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
    */

  • 相关阅读:
    Java中Runnable和Thread的区别
    git 代理设置
    Android的bitmap和优化
    String、StringBuffer与StringBuilder之间区别
    工作流的一些记录
    UIAutomation调用计算器模拟自动执行
    从客户端(Content="<EM ><STRONG ><U >这是测试这...")中检测到有潜在危险的Request.Form 值。
    泛型
    基础加强
    数据库和ado
  • 原文地址:https://www.cnblogs.com/miffees/p/6075900.html
Copyright © 2020-2023  润新知