CSS3旋轉風車效果程式碼
分享一段程式碼例項,它利用css3實現了旋轉風車效果。
程式碼例項如下:
[HTML] 純文字檢視 複製程式碼執行程式碼<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://www.softwhy.com/" /> <title>螞蟻部落</title> <style type="text/css"> * { margin: 0px; padding: 0px; } body { background-color: black; } div { background-color: black; } .bottom { width: 0px; margin: 0 auto; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 500px solid transparent; border-bottom: 350px solid white; position: relative; z-index: 1; } .circle { width: 16px; height: 16px; border-radius: 100%; z-index: 1; background: white; position: absolute; top: 8px; left: -8px; } .flabellumarea { width: 300px; height: 300px; position: absolute; top: -135px; left: -150px; z-index: 0; background-color: transparent; transform-style: preserve-3d; animation: rotate 9s linear infinite; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes name { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .one { width: 50px; height: 100px; background-size: 10px 10px; position: absolute; left: 148px; background-image: linear-gradient(90deg,white 50%,transparent 50%), linear-gradient(white 50%,transparent 50%); } .one .a { width: 5px; height: 50px; background-color: white; position: absolute; top: 100px; left: 0px; } .two { width: 100px; height: 50px; background-size: 10px 10px; position: absolute; left: 0px; top: 103px; background-image: linear-gradient(90deg,white 50%,transparent 50%), linear-gradient(transparent 50%,white 50%); } .two .a { width: 50px; height: 5px; background-color: white; position: absolute; right: -50px; bottom: 0px; } .three { width: 50px; height: 100px; background-size: 10px 10px; position: absolute; left: 103px; bottom: 0px; background-image: linear-gradient(90deg,transparent 50%,white 50%), linear-gradient(transparent 50%,white 50%); } .three .a { width: 5px; height: 60px; background-color: white; position: absolute; left: 45px; bottom: 100px; } .four { width: 100px; height: 50px; background-size: 10px 10px; position: absolute; right: 0px; top: 148px; background-image: linear-gradient(90deg,transparent 50%,white 50%), linear-gradient(white 50%,transparent 50%); } .four .a { width: 50px; height: 5px; background-color: white; position: absolute; left: -50px; top: 0px; } </style> </head> <body> <div class="bottom"> <div class="circle"></div> <div class="flabellumarea"> <div class="flabellum one"><div class="a"></div></div> <div class="flabellum two"><div class="a"></div></div> <div class="flabellum three"><div class="a"></div></div> <div class="flabellum four"><div class="a"></div></div> </div> </div> </body> </html>
相關文章
- CSS3旋轉大風車效果詳解CSSS3
- CSS3旋轉效果程式碼例項CSSS3
- CSS3多面體旋轉效果CSSS3
- CSS3星系旋轉效果代CSSS3
- CSS3圖片旋轉效果CSSS3
- CSS3旋轉載入等待效果CSSS3
- CSS3地月星系旋轉效果CSSS3
- CSS3滑鼠懸浮div旋轉效果CSSS3
- 簡單的css3頭像旋轉與3D旋轉效果CSSS33D
- 滑鼠懸浮電風扇旋轉效果
- CSS3立方體3D旋轉效果CSSS33D
- 使用css3做一個魔方旋轉的效果CSSS3
- 手寫一個使用css3旋轉硬幣的效果CSSS3
- CSS3箭靶效果程式碼CSSS3
- CSS3 loadding效果程式碼CSSS3
- 箭頭旋轉程式碼
- CSS3圓環效果程式碼CSSS3
- CSS3現菱形效果程式碼CSSS3
- 卡片旋轉動畫效果動畫
- CSS3動畫(360度旋轉、旋轉放大、放大、移動)CSSS3動畫
- CSS3紅色心形效果程式碼CSSS3
- CSS3滾動條效果程式碼CSSS3
- CSS3折角效果程式碼CSSS3
- CSS3日食效果程式碼CSSS3
- css3水滴效果程式碼例項CSSS3
- CSS3進度條效果程式碼CSSS3
- CSS3皮卡丘效果程式碼CSSS3
- CSS3翻轉效果CSSS3
- CSS3 loadding旋轉等待動畫CSSS3動畫
- 頁面旋轉動畫效果動畫
- css3晃動效果程式碼例項CSSS3
- CSS3心形效果程式碼例項CSSS3
- CSS3圓形時鐘效果程式碼CSSS3
- autodesk-forge 模型旋轉程式碼模型
- CSS3滑鼠懸浮圖示旋轉CSSS3
- 滑鼠懸浮圖片旋轉效果
- CSS3滑過光束效果程式碼例項CSSS3
- CSS3小黃人效果程式碼例項CSSS3