纯css实现wifi搜索动画效果
代码语言:html
所属分类:动画
代码描述:纯css实现wifi搜索动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> #wifi-loader { --background: #62ABFF; --front-color: #4F29F0; --back-color: #C3C8DE; --text-color: #414856; width: 64px; height: 64px; border-radius: 50px; position: relative; display: -webkit-box; display: flex; -webkit-box-pack: center; justify-content: center; -webkit-box-align: center; align-items: center; } #wifi-loader svg { position: absolute; display: -webkit-box; display: flex; -webkit-box-pack: center; justify-content: center; -webkit-box-align: center; align-items: center; } #wifi-loader svg circle { position: absolute; fill: none; stroke-width: 6px; stroke-linecap: round; stroke-linejoin: round; -webkit-transform: rotate(-100deg); transform: rotate(-100deg); -webkit-transform-origin: center; transform-origin: center; } #wifi-loader svg circle.back { stroke: var(--back-color); } #wifi-loader svg circle.front { stroke: var(--front-color); } #wifi-loader svg.circle-outer { height: 86px; width: 86px; } #wifi-loader svg.circle-outer circle { stroke-dasharray: 62.75 188.25; } #wifi-loader svg.circle-outer circle.back { -webkit-animation: circle-outer 1.8s ease infinite .3s; animation: circle-outer 1.8s ease infinite .3s; } #wifi-loader svg.circle-outer circle.front { -webkit-animation: circle-outer 1.8s ease infinite .15s; animation: circle-outer 1.8s ease infinite .15s; } #wifi-loader svg.circle-middle { height: 60px; width: 60px; } #wifi-loader svg.circle-middle circle { stroke-dasharray: 42.5 127.5; } #wifi-loader svg.circle-middle circle.back { -webkit-animation: circle-middle 1.8s ease infinite .25s; animation: circle-middle 1.8s ease infinite .25s; } #wifi-loader svg.circle-middle circle.front { -webkit-animation: circle-middle 1.8s ease infinite .1s; animation: circle-middle 1.8s ease infinite .1s; } #wifi-loader svg.circle-inner { height: 34px; width: 34px; } #wifi-loader svg.circle-inner circle { stroke-dasharray: 22 66; } #wifi-loader svg.circle-inner circle.back { -webkit-animation: circle-inner 1.8s ease infinite .2s; animation: circle-inner 1.8s ease infinite .2s; } #wifi-loader svg.circle-inner circle.front { -webkit-animation: circle-inner 1.8s ease infinite .05s; animation: circle-inner 1.8s ease infinite .05s; } #wifi-loader .text { position: absolute; bottom: -40px; display: -webkit-box; display: flex; -webkit-box-pack: center; justify-content: center; -webkit-box-align: center; align-items: center; text-transform: lowercase; font-weight: 500; font-size: 14px; letter-spacing: .2px; } #wifi-loader .text::before, #wifi-loader .text::after { content: attr(data-text); } #wifi-loader .text::before { color: var(--text-color); } #wifi-loader .text::after { color: var(--front-color); -webkit-animation: text-animation 3.6s ease infinite; animation: text-animation 3.6s ease infinite; position: absolute; left: 0; } @-webkit-keyframes circle-outer { 0% { stroke-dashoffset: 25; } 25% { stroke-dashoffset: 0; } 65% { stroke-dashoffset: 301; } 80% { stroke-dashoffset: 276; } 100% { stroke-dashoffset: 276; } } @keyframes circle-outer { 0% { stroke-dashoffset: 25; } 25% { stroke-dashoffset: 0; } 65% { stroke-dashoffset: 301; } 80% { stroke-dashoffset: 276; } 100% { stroke-dashoffset: 276; } } @-webkit-keyframes circle-middle { 0% { stroke-dashoffset: 17; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0