css实现线条波纹涟漪动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现线条波纹涟漪动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> :root { } body { background-image: radial-gradient(darkcyan, darkblue); margin: 0 auto; height: 100vw; width: 100vh; overflow: hidden; } img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .c { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotateX(45deg); /* Native CSS properties don't support the customization of border-style. Therefore, we use a trick with an SVG image inside background-image property. https://kovart.github.io/dashed-border-generator/ */ /* background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='100' ry='100' stroke='aqua' stroke-width='1' stroke-dasharray='1' stroke-dashoffset='1' stroke-linecap='butt'/%3e%3c/svg%3e"); */ border-radius: 50%; border: 1px dotted aqua; animation: dripBounce 5s infinite; } @keyframes dripBounce { /* 0%{top:50%} */ 10% { top: calc(50% + 5px); } 20% { top: calc(50% - 5px); } 35% { top: 50%; } } .c1 { height: 10px; width: 20px; animation-delay: -10s; } .c2 { height: 20px; width: 40px; animation-delay: -9.8s; top: calc(50% + 1px); } .c3 { height: 30px; width: 60px; animation-delay: -9.6s; top: calc(50% + 2px); } .c4 { height: 40px; width: 80px; animation-delay: -9.4s; top: calc(50% + 3px); } .c5 { height: 50px; width: 100px; animation-delay: -9.2s; top: calc(50% + 4px); } .c6 { height: 60px; width: 120px; animation-delay: -9s; top: calc(50% + 5px); } .c7 { height: 70px; width: 140px; animation-delay: -8.8s; top: calc(50% + 6px); } .c8 { height: 80px; width: 160px; animation-delay: -8.6s; top: calc(50% + 7px); } .c9 { height: 90px; width: 180px; animation-delay: -8.4s; top: calc(50% + 8px); } .c10 { height: 100px; width: 200px; animation-delay: -8.2s; top: calc(50% + 9px); } .c11 { height: 110px; width: 220px; animation-delay: -8s; top: calc(50% + 10px); } .c12 { height: 120px; width: 240px; animation-delay: -7.8s; top: calc(50% + 11px); } .c13 { height: 130px; width: 260px; animation-delay: -7.6s; top: calc(50% + 12px); } .c14 { height: 140px; width: 280px; animation-delay: -7.4s; top: calc(50% + 13px); } .c15 { height: 150px; width: 300px; animation-delay: -7.2s; top: calc(50% + 14px); } .c16 { height: 160px; width: 320px; animation-delay: -7s; top: calc(50% + 15px); } .c17 { height: 170px; width: 340px; animation-delay: -6.8s; top: calc(50% + 16px); } .c18 { height: 180px; width: 360px; animation-delay: -6.6s; top: calc(50% + 17px); } .c19 { height: 19.........完整代码请登录后点击上方下载按钮下载查看
网友评论0