请老师检查,谢谢!

请老师检查,谢谢!

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2-5</title>
    <style type="text/css">
        div {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            box-sizing: border-box;
            width: 400px;
            height: 400px;
            margin: auto;
            border: 1px solid red;
            border-bottom: 200px solid red;
            border-radius: 50%;
            transform-origin: 50% 50%;
            animation-name: rotate;
            animation-duration: 5s;
            animation-timing-function: linear;
            animation-iteration-count: infinite;
            z-index: 1;
        }
        div::before,
        div::after{
          display: block;
          content: "";
          width: 200px;
          height: 200px;
          border-radius: 50%;
          position: absolute;
          z-index: 20;
        }
        div::after{
          background: red;
          top: 96px;
          left: 0px ;
        }
        div::before{
          background: #fff;
          top: 96px;
          right: 0px;
        }
        .sub_1,
        .sub_2{
          display: block;
          width: 50px;
          height: 50px;
          border-radius: 50%;
          position: absolute;
          z-index: 30;
        }
        .sub_1{
          top: 165px;
          left: 70px;
          background: #fff;
        }
        .sub_2{
          top: 165px;
          right: 70px;
          background:#ff0000;
        }
        @keyframes rotate {
          form{ transform: rotateZ(0deg);}
          to{ transform: rotateZ(360deg);}
        }
    </style>
</head>
<body>
    <div>
      <span class="sub_1"></span>
      <span class="sub_2"></span>
    </div>
</body>
</html>


正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学你好,效果是正确的,继续加油,祝学习愉快~

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师