js+css实现彩虹多色圈圈效果代码
代码语言:html
所属分类:布局界面
代码描述:js+css实现彩虹多色圈圈效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> html { overflow: hidden; text-align: center; font-family: sans-serif; line-height: 50px; user-select: none; background: black; color: white; } div { position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 50%); transform-origin: 1% 99%; border-radius: 50%; --base-calc: calc(100vw / 7); user-select: all; cursor: pointer; line-height: calc(var(--base-calc) * 0.5); z-index: -1; } @keyframes bounce { 50% { transform: scale(1.15) translate(-50%, 50%); } } div:nth-child(7) { width: var(--base-calc); height: var(--base-calc); background: violet; animation: 0.9s linear forwards; } div:nth-child(6) { width: calc(var(--base-calc) * 2); height: calc(var(--base-calc) * 2); background: DarkOrchid; animation: 0.8s linear 0.25s forwards; } div:nth-child(5) { width: calc(var(--base-calc) * 3); height: calc(var(--base-calc) * 3); background: blue; animation: 0.7s linear 0.5s forwards; } div:nth-child(4) { width: calc(var(--base-calc) * 4); height: calc(var(--base-calc) * 4); background: mediumseagreen; animation: 0.6s linear 0.75s forwards; } div:nth-child(3) { width: calc(var(--base-calc) * 5); height: calc(var(--base-calc) * 5); background: gold; animation: 0.6s linear 1s forwards; } div:nth-child(2) { width: calc(var(--base-calc) * 6); height: calc(var(--base-calc) * 6); background: darkorange; animation: 0.6s linear 1.25s forwards; } div:nth-child(1) { width: calc(var(--base-calc) * 7); height: calc(var(--base-calc) * 7); background: red; animation: 0.6s linear 1.5s forwards; } </style> </head> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0