css实现数字百分比跳动进度条效果代码
代码语言:html
所属分类:进度条
代码描述:css实现数字百分比跳动进度条效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,600&display=swap'); body { margin: 0; height: 100vh; background: #333; fill: white; display: flex; flex-direction: column; justify-content: center; align-items: stretch; } body.complete { background: white; fill: #333; transition: background-color 1s linear, fill 1s linear; } svg { font-family: 'Crimson Text'; width: 100%; height: 10%; overflow: visible; } #number { font-size: 40px; font-weight: 600; text-anchor: end; } #slash { font-size:36px; text-anchor: middle; font-style: italic; } #zeros { font-size: 20px; font-weight: 600; text-anchor: middle; } </style> </head> <body translate="no"> <svg viewBox="-72 10 116 36"> <text id="number" x="-15" y="40">0</text> <text id="slash" x="0" y="41.3" transform="rotate(10,0,28.5)">/<animateTransform class="leap" attributeName="transform" type="rotate" from="10,0,28.5" to="370,0,28.5" begin="indefinite" dur="1s" /></text> <text id="zeros" transform="matrix(1.32,0,0.05,1,0,0)&qu.........完整代码请登录后点击上方下载按钮下载查看
网友评论0