久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

【聊代碼】第九十集 css樣式(之六十)只公轉(zhuǎn)而不自轉(zhuǎn)效果|老小孩講述

 一片心花正放時 2022-09-17 發(fā)布于河北

           
           

               



























聊代碼(第九十集)css樣式(之六十)

       我們制作旋轉(zhuǎn)動畫,,如果旋轉(zhuǎn)的元素是圖案,怎樣旋轉(zhuǎn)都可以,無須多慮,,好看就好,。而要是人物、動物或建筑物,,讓他們不停地翻跟斗就不妥了,。因此,在旋轉(zhuǎn)動畫中,,上述元素是不宜自轉(zhuǎn)的,。請看下圖效果。












       代碼:



<div align="center">

<style type="text/css">.背景圖{

border-radius: 50%;

background-

image:url(http://img1.oldkids.cn/upload/260811000/u260810070/2015/11/19/

blog_20151119095423533407.gif);

width: 470px;

height: 470px;

}

.轉(zhuǎn)環(huán)及旋轉(zhuǎn)圖{

width: 470px;

height: 470px;

box-shadow: 0px 0px 0px 15px rgba(150,130,0,1);

border-radius: 50%;

transform-origin: 50% ;

animation: linear mymove 10s infinite;

}

@keyframes mymove{

from {transform:rotate(0deg);}

to {transform:rotate(-360deg);}

}

img:nth-child(1){ position: absolute; top: 0px; left: 180px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(2){ position: absolute; top: 60px; left: 300px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(3){ position: absolute; top: 180px; left: 360px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(4){ position: absolute; top: 300px; left: 300px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(5){ position: absolute; top: 360px; left: 180px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(6){ position: absolute; top: 300px; left: 60px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(7){ position: absolute; top: 180px; left: 0px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(8){ position: absolute; top: 60px; left: 60px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

img:nth-child(9){ position: absolute; top: 180px; left: 180px;

animation: re-rotate 10s infinite linear;

transform-origin:top 50%;

}

@keyframes re-rotate{

0%{ transform: rotate(0deg); }

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

}

</style>

<div class="背景圖">

<div class="轉(zhuǎn)環(huán)及旋轉(zhuǎn)圖"><img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /><img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /> <img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /> <img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /> <img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /> <img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /> <img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /> <img src="http://image109.360doc.com/DownloadImg/2022/09/1713/252209246_1_20220917011038802.gif" /> <img src="https://www.oldkids.cn/upload/2018/03/06/blog_20180306215430689.png" /></div> </div>

</div>





       代碼解析:



       我的頭像和鴿子都不翻轉(zhuǎn),,其措施是設置兩個旋轉(zhuǎn)方向相反的旋轉(zhuǎn)屬性,。一個是 transform: rotate(360deg) ,另一個是transform: rotate(-360deg),。



       再看下面一圖,,與上圖無大區(qū)別,只是讓背景圖慢速旋轉(zhuǎn)了,,中間放了一個動畫(此圖不再另附代碼),。

















               

 


           

           
               
           

       

       

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點,。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,,謹防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報,。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約