太阳系

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            body{
                background-color: #000;
            }
            .sun{
                width: 100px;
                height: 100px;
                border-radius: 50%;
                background-color: red;
                position: absolute;
                left:50%;/*这两个属性是让他居中*/
                top:50%; 
                 margin-left:-50px;
                margin-top:-50px;
                box-shadow: 0  0 30px 2px red;/*阴影效果: x轴的偏移量,y轴上的偏移量,模糊程度,颜色*/
            }
            .DiQiu{
                width: 300px;
                height: 300px;
                left: 50%;
                top: 50%;
                border-radius: 50%;
                border: 1px solid #ccc;
                position: absolute;
                margin-left:-150px;
                margin-top:-150px;
            }
            .DiQiu::after{
                width: 30px;
                height: 30px;
                position: absolute;
                background-color: darkturquoise;
                border-radius: 50%;
                left: 0%;
                top: 50%;
                margin-left:-15px;
                margin-top:-15px;
                content:"";/*显示在这条线上*/
            }
            .YueQiu{
                width: 10px;
                height: 10px;
                background-color: #fff;
                border-radius: 50%;
                position: absolute;
                 left:-25px;
                 top:50%;
                 margin-left: -5px;
                 margin-top:-5px;
                transform-origin: 30px 5px;
                animation: rot 3s linear infinite;/*谁转就给谁这个属性*/
            }
            .Ming{
                width: 450px;
                height: 450px;
                left: 50%;
                top: 50%;
                border-radius: 50%;
                border: 1px solid #ccc;
                position: absolute;
                margin-left:-220px;
                margin-top:-220px;
                animation: rot 12s linear infinite;
            }
            .Ming:after{
                width: 50px;
                height: 50px;
                position: absolute;
                background-color: blueviolet;
                border-radius: 50%;
                left: 0%;
                top: 50%;
                margin-left:-25px;
                margin-top:-25px;
                content:"";
            }
            .Hai{
                 width: 650px;
                height: 650px;
                position: absolute;
                left:50%;
                top:50%;
                margin-left:-310px;
                margin-top:-310px;
                border-radius: 50%;
                border: 1px solid #ccc;
                animation: rot 15s linear infinite;

            }
            .Hai:after{
                 width: 70px;
                 height: 70px;
                 position: absolute;
                 left:0%;
                 top:50%;
                margin-left:-30px;
                margin-top:-30px;
                border-radius: 50%;
                background-color:  chocolate;
                content:"";

            }
            .Di{
                 width: 650px;
                height: 650px;
                position: absolute;
                left:10%;
                top:10%;
                margin-left:-50px;
                margin-top:-100px;
                border-radius: 50%;
                border: 1px solid #ccc;
                animation: rot 8s linear infinite;
            }
            .Di:after{
                 width: 100px;
                 height: 30px;
                 position: absolute;
                 left:0%;
                 top:50%;
                margin-left:-30px;
                margin-top:-30px;
                border-radius: 50%;
                background-color: #4B8BF5;
                content:"";
            }
            /*转圈动画代码!!!!*/
             @keyframes rot {
            0%{

            }
            100%{
                transform:rotate(360deg);
            }
        }

        </style>
    </head>
    <body>
        <div class="sun">太阳</div>
        <div class="DiQiu">地球
            <div class="YueQiu">月球</div>
        </div>
        <div class="Ming">冥王星</div>
        <div class="Hai">海王星</div>
        <div class="Di">海王星</div>
    </body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值