• 今天学习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;
    */

  • 相关阅读:
    ASP.NET MVC EF4.1
    RabbitMQ Boot Step
    图书商城项目总论
    CodeSharp.EventSourcing框架介绍如何实现异步事件订阅
    asp.net的cms 原理篇
    异步编程:线程概述及使用
    2012
    CodeSharp.EventSourcing框架介绍
    最近开发的一个文档管理系统
    团队项目开发
  • 原文地址:https://www.cnblogs.com/miffees/p/6075900.html
Copyright © 2020-2023  润新知