第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

塊繞點旋轉(zhuǎn),在動畫中用

標(biāo)簽:
Html/CSS
   body{
            overflow: hidden;
        }
        main{
            width: 800px;
            height: 600px;
            margin: 100px auto;
            background-color: lightgray;

            position: relative;
        }
        #dot{
            width: 30px;
            height: 30px;
            background-color: red;
            border-radius: 15px;

            /*放在main的中心*/
            position: absolute;
            top: calc(50% - 30px / 2);
            left: calc( 50% - 30px / 2);
        }

        #color{
            width: 100px;
            height: 100px;
            background-color: red;

            /*定宽居中*/
            margin: 100px auto;

            /*修改旋转中心为灰色块的中心;默认值是图形的中心点*/
            /*以颜色块的左上角为坐标原点,
            计算灰色块中心点的坐标值*/
            transform-origin: 50px 300px;
            /*动画*/

            /*动画的名称;多个动画名称以逗号分隔*/
            /*animation-name: rotate,changeColor;*/
            /*动画的时间*/
            animation-duration: 5s;

            /*保持动画状态*/
            animation-fill-mode: both;
            /*动画延迟*/
            animation-delay: 3s;

            /*动画的速率*/
            animation-timing-function: linear;
            /*动画的重复次数 infinite:无穷*/
            animation-iteration-count: infinite;
            /*动画的方向*/
            animation-direction: reverse;
        }

       /*改变颜色的动画*/
       @keyframes changeColor{
           from{
               background-color: red;
           }20%{
               background-color: yellow;
           }45%{
               background-color: blue;
           }60%{
               background-color: black;
           }77%{
               background-color: green;
           }100%{
               background-color: red;
           }
       }

       /*旋转的动画*/
      @keyframes rotate{
          from{
             transform: rotate(0deg);
          }to{
              transform: rotate(360deg);
          }
      }
    </style>
</head>
<body>
    <main>
        <section id="dot"></section>
        <section id="color"></section>
    </main>
</body>
點擊查看更多內(nèi)容
3人點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質(zhì)文章

正在加載中
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學(xué)

大額優(yōu)惠券免費領(lǐng)

立即參與 放棄機會
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

舉報

0/150
提交
取消