svg实现敲代码的蛋蛋动画效果代码
代码语言:html
所属分类:动画
代码描述:svg实现敲代码的蛋蛋动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; } body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #26324a; background: #36393f; } .eggo { height: 50vmin; } .eggo__lines { -webkit-animation: code 1s infinite linear; animation: code 1s infinite linear; } @-webkit-keyframes code { to { transform: translate(0, -125px); } } @keyframes code { to { transform: translate(0, -125px); } } </style> </head> <body> <svg class="eggo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 412.8"> <defs> <g id="a"> <path opacity=".75" fill="#22da6e" stroke-width="7.1" d="M307.9 57.7h73.5V73h-73.5z"/> <path opacity=".75" fill="#c792ea" stroke-width="9.9" d="M240.1 78.5h141.3v15.3H240.1z"/> <path opacity=".75" fill="#21c7a8" stroke-width="8" d="M287.7 99.3h93.6v15.3h-93.6z"/> <path opacity=".75" fill="#f78c6c" stroke-width="6.9" d="M312.2 120h69.1v15.3h-69.1z"/> <path opacity=".75" fill="#82aaff" stroke-width="8.2" d="M282.9 140.8h98.4v15.3h-98.4z"/> <path opacity=".75" fill="#ef5350" stroke-width="8.9" d="M266.3 161.5h115v15.3h-115z"/> <path opacity=".75" fill="#addb67" stroke-width="4.9" d="M265.9 57.7h35V73h-35z"/> </g> <g id="c"> <use href="#a"/> <use href="#a" y="125"/> </g> <clipPath id="b"> <path d="M253 150a15.5 15.5 0 00-15.7 13c-1.7 8.9-2.8 17.9-3.3 27-.1 10.3 3.6 17.3 11 21 27.6 12.2 59.7 18.3 98 18.5 3 0 5.6-2 6.4-4.8 3.6-14.3 8.6-35.5 9.1-55 0-1.8-1-3.5-2.7-4.3-26.3-11.7-82.4-15.7-102.9-15.4zM42 165.4a4.6 4.6 0 00-2.7 4.4c.5 19.4 5.5 40.6 9.1 55a6.5 6.5 0 006.3 4.8c38.4-.2 70.5-6.3 98.1-18.6 7.4-3.6 11.1-10.7 11-21-.5-9.1-1.6-18.1-3.3-27-.3-2.1-3-12.8-15.6-13-12-.2-73.3 2.2-102.9 15.4z"/> </clipPath> </defs> <path d="M198.9 31.1c71.1 0 128.8 152.8 128.8 223.9a128.7 128.7 0 11-257.4 0c0-71.1 57.6-223.9 128.7-223.9z" fill="#FCFBFA"/> <path d="M86.3 135.1a307 307 0 0143.9-76.6c21.8-26.5 45-40 68.7-40 23.8 0 46.9 13.5 68.7 40a304 304 0 0143.9 76.6l.6 1.5-1.6-.2L298 135h-.6l-.2-.6c-14.2-33.1-38.5-76.5-69.9-94.6-9.4-5.5-19-8.3-28.4-8.3s-19 2.8-28.5 8.3c-31.3 18-55.5 61.3-69.8 94.6l-.2.5-.6.1-12.5 1.5-1.6.2z" class="cls-5" fill="#56555c"/> <path d="M198.9 394.3a140.3 140.3 0 01-130.6-89 142 142 0 01-9.6-57v-1h1c4.5 0 7.6-.2 11-.3h1v1a127.7 127.7 0 008.3 52 127.4 127.4 0 00210.7 42.1 126.2 126.2 0 0026.8-42 127.7 127.7 0 008.5-52.2v-1h1l11 .4h1v.9a142 142 0 01-9.7 57 140.2 140.2 0 01-130.5 89z" class="cls-5" fill="#56555c"/> <path d="M362 153.4L309.7 172l8.2 24.8c0 .2 52.3-6.7 52.3-6.7z" class="cls-3" fill="#252526"/> <path d="M35.7 153.4L88.2 172 80 196.8c0 .2-52.3-6.7-52.3-6.7z" class="cls-3" fill="#252526"/> <path d="M144.9 149c13.2.3 16 11.2 16.5 13.8a215.8 215.8 0 013.3 27.1 34.6 34.6 0 01-.7 7.6 226.6 226.6 0 00-2.6-18.2 16.4 16.4 0 00-16.5-13.8c-8-.1-33.6.8-59 4.5a361 361 0 016-17.3 445.5 445.5 0 0153-3.6z" class="cls-4" fill="hsla(0, 0%, 0%, 0.5)"/> <path d="M327.3 248.3c-46.3-2.4-85.9-17.2-94.8-22.6-7-3.3-15.9-10.3-18.5-28-1.7 19.5 2 37.2 20.3 46 1.3.8 36.3 18.1 92.7 21a131.2 131.2 0 00.3-16.4z".........完整代码请登录后点击上方下载按钮下载查看
网友评论0