css实现立体新年数字内部烟花绽放动画代码
代码语言:html
所属分类:动画
代码描述:css实现立体新年数字内部烟花绽放动画代码,带背景音乐。
代码标签: css 立体 新年 数字 内部 烟花 绽放 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> & { --s: min(45px,round(6.5vw,1px)); } n { display: grid; grid-template-columns: repeat(3,var(--s)); } n:after { content: ""; position: absolute; height: var(--s); aspect-ratio: 3; bottom: 0; right: 0; transform-origin: bottom; transform: rotateX(90deg); box-shadow: 0 0 20px 7px #000d; } body:not(.rick) n.c45:after { aspect-ratio: 1; } d { aspect-ratio: 1; background: url(//repo.bfw.wiki/bfwrepo/icon/5fefd51f4ddbe.gif) calc(var(--x,0)*var(--s)) calc(50% + var(--y,0)*var(--s))/0px 0px; background-color: #CE1836; display: grid; scale: 1.02; } .rick d{ background-size: calc(15*var(--s)) auto; } d:before, d:after { content:""; grid-area: 1/1; } d:before { transform-origin: top; transform: rotateX(-90deg); background: #df5168; } d:nth-child(-n + 4):before { background: #ff7c92; } d:after { transform-origin: right; transform: rotateY(-90deg); background: #7d1022; } .c2 > :is(:nth-child(4),:nth-child(5),:nth-child(11),:nth-child(12)), .c0 > :is(:nth-child(5),:nth-child(8),:nth-child(11)), body:not(.rick) .c45 > :is(:nth-child(2),:nth-child(5),:nth-child(10),:nth-child(11),:nth-child(13),:nth-child(14)), body.rick .c45 > :is(:nth-child(5),:nth-child(6),:nth-child(10),:nth-child(11)){ visibility: hidden; } n:nth-child(1) d:nth-child(3n + 2) {--x:-1} n:nth-child(1) d:nth-child(3n + 3) {--x:-2} n:nth-child(2) d:nth-child(3n + 1) {--x:-4} n:nth-child(2) d:nth-child(3n + 2) {--x:-5} n:nth-child(2) d:nth-child(3n + 3) {--x:-6} n:nth-child(3) d:nth-child(3n + 1) {--x:-8} n:nth-child(3) d:nth-child(3n + 2) {--x:-9} n:nth-child(3) d:nth-child(3n + 3) {--x:-10} n:nth-child(4) d:nth-child(3n + 1) {--x:-12} n:nth-child(4) d:nth-child(3n + 2) {--x:-13} n:nth-child(4) d:nth-child.........完整代码请登录后点击上方下载按钮下载查看
网友评论0