国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

css實現毛毛蟲爬行動作

2024-07-11 08:25:18
字體:
來源:轉載
供稿:網友

毛毛蟲兒時大家都有見過,今天想起來寫一個爬行的動作,具體代碼如下所示:

html代碼:

<div class='container'> <div class='hide left'></div> <div class='hide right'></div> <div class='hide bottom'></div> <div class='circle-container'> <div class='circle'></div> </div></div>

css代碼:

<style>body { background-color: #1B6CB2; margin: 0;}.container { position: absolute; width: 600px; height: 400px; overflow: hidden; top: 50%; left: 60%; transform: translate(-50%, -50%);}.hide { height: 100%; width: 150px; background: #1B6CB2; position: absolute; z-index: 2;}.hide.left { left: 0;}.hide.right { right: 0;}.hide.bottom { bottom: 0; width: 100%; height: 50%;}.circle { position: absolute; height: 75px; width: 150px; border: 3px solid white; border-radius: 50%/100% 100% 0 0; border-bottom: none; top: 40%; left: 50%; transform-origin: 0% 50%; transform: translate(-50%, -50%); animation: magic 1.8s ease infinite;}@keyframes magic { 0% { transform: rotate(-170deg) translate(-50%, -50%); } 50% { transform: rotate(0deg) translate(-50%, -50%); } 100% { transform: rotate(180deg) translate(-50%, -50%); }}.circle-container { position: absolute; height: 75px; width: 150px; top: 40%; left: 50%; transform-origin: 0% 50%; transform: translate(-50%, -50%); animation: power 1.8s ease-out infinite;}@keyframes power { 0% { margin-left: 20px; } 50% { margin-left: -55px; } 99.9% { margin-left: -130px; } 100% { margin-left: 20px; }} </style>

總結

以上所述是小編給大家介紹的css實現毛毛蟲爬行動作,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對錯新站長站網站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 抚州市| 安徽省| 清涧县| 阿拉尔市| 临桂县| 抚远县| 吉木乃县| 原平市| 台中市| 泾川县| 建平县| 萍乡市| 霍邱县| 许昌市| 米脂县| 海兴县| 大理市| 洪湖市| 西吉县| 博白县| 香河县| 横峰县| 林口县| 晋中市| 吉首市| 周宁县| 龙胜| 晋城| 海安县| 北辰区| 南充市| 青岛市| 福泉市| 临海市| 澄城县| 正镶白旗| 崇阳县| 宣威市| 日土县| 高雄县| 昭觉县|