div+css实现点线状海洋生物运动动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现点线状海洋生物运动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { transform-style: preserve-3d; box-sizing: border-box; } body { margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; perspective: 100vmin; background: radial-gradient(circle at 50% 100%,#000, #20113a); } .creature { width: 50vmin; height: 50vmin; background: /*radial-gradient(#fff4, 25vmin, #fff0 25vmin),*/ #ffF0; position: relative; transform: rotateX(-25deg); transform: rotateX(-210deg) rotateY(510deg) rotatez(175deg); display: flex; align-items: center; justify-content: center; } .creature div { --sz: 23%; --dl: 0.1s; width: var(--sz); height: var(--sz); position: absolute; border-radius: 100%; transform: rotateX(90deg) translateZ(23.75vmin); } .creature div:nth-child(2) { transform: rotateX(90deg) translateZ(22.5vmin); --sz: 43%; --dl: -0.1s; } .creature div:nth-child(3) { transform: rotateX(90deg) translateZ(20vmin); --sz: 60%; --dl: -0.2s; } .creature div:nth-child(4) { transform: rotateX(90deg) translateZ(17.5vmin); --sz: 71%; --dl: -0.3s; } .creature div:nth-child(5) { transform: rotateX(90deg) translateZ(15vmin); --sz: 80%; --dl: -0.4s; } .creature div:nth-child(6) { transform: rotateX(90deg) translateZ(12.5vmin); --sz: 86%; --dl: -0.5s; } .creature div:nth-child(7) { transform: rotateX(90deg) translateZ(10vmin); --sz: 91%; --dl: -0.6s; } .creature div:nth-child(8) { transform: rotateX(90deg) translateZ(7.5vmin); --sz: 95%; --dl: -0.7s; } .creature div:nth-child(9) { transform: rotateX(90deg) translateZ(5vmin); --sz: 97%; --dl: -0.8s; } .creature div:nth-child(10) { transform: rotateX(90deg) translateZ(2.5vmin); --sz: 99%; --dl: 0.9s; } .creature div:nth-child(11) { transform: rotateX(90deg); --sz: 100%; --dl: -1s; } .creature div:nth-child(12) { transform: rotateX(90deg) translateZ(-2.5vmin); --sz: 99%; --dl: -1.1s; } .creature div:nth-child(13) { transform: rotateX(90deg) translateZ(-5vmin); --sz: 97%; --dl: -1.2s; } .creature div:nth-child(14) { transform: rotateX(90deg) translateZ(-7.5vmin); --sz: 95%; --dl: -1.3s; } .creature div:nth-child(15) { transform: rotateX(90deg) translateZ(-10vmin); --sz: 91%; --dl: -1.4s; } .creature div:nth-child(16) { transform: rotateX(90deg) translateZ(-12.5vmin); --sz: 86%; --dl: -1.5s; } .creature div:nth-child(17) { transform: rotateX(90deg) translateZ(-15vmin); --sz: 80%; --dl: -1.6s; } .creature div:nth-child(18) { transform: rotateX(90deg) translateZ(-17.5vmin); --sz: 71%; --dl: -1.7s; } .creature div:nth-child(19) { transform: rotateX(90deg) translateZ(-20vmin); --sz: 60%; --dl: -1.8s; } .creature div:nth-child(20) { transform: rotateX(90deg) translateZ(-22.5vmin); --sz: 43%; --dl: -1.9s; } .creature div:nth-child(21) { transform: rotateX(90deg) translateZ(-23.75vmin); --sz: 23%; --dl: -2s; } .creature div:before { --c1: #6a36c5; --c2: #9255ff; --c3: #7b44dd; content: ""; width: calc(100% + 2vmin); height: calc(100% + 2vmin); position: absolute; top: -1vmin; left: -1vmin; border-radius: 100%; animation: spin-line 2.5s ease-in-out 0s infinite alternate; background: radial-grad.........完整代码请登录后点击上方下载按钮下载查看
网友评论0