纯css实现风暴眼效果
代码语言:html
所属分类:布局界面
代码描述:纯css实现风暴眼效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> html, body { padding: 0; margin: 0; } body { position: relative; width: 100vw; min-width: 800px; height: 100vh; min-height: 600px; background: linear-gradient(-45deg, #8691b3, #edeef3); } body *, body *:before, body *:after { content: ''; position: absolute; top: 50%; left: 50%; } .eye { width: 332px; height: 332px; transform: translate(-50%, -50%); border-radius: 50%; background: #EBEDF3; filter: blur(5px); animation: eyeAnimation 4s cubic-bezier(1, 0, 1, 1) infinite; } @keyframes eyeAnimation { 0%, 33%, 100% { box-shadow: inset -8px -13px 20px -10px rgba(230, 230, 236, 0.04), 64px 55px 40px -40px #38406A, 20px 18px 30px -10px #38406A, inset -70px -50px 60px -30px #4b6398, inset -90px -90px 70px -90px #697398, inset -70px -50px 100px -40px #697398, inset 80px 50px 80px -50px #eeeef3, -25px -15px 50px -10px #F6F6FB, 14px -1px 50px -10px #7e7ea9, 1px 9px 50px -10px #7e7ea9, inset -90px 40px 60px -20px rgba(116, 66, 255, 0.1), inset -90px -120px 60px -20px rgba(116, 66, 255, 0.1); transform: translate(-50%, -50%) scale(1.25); } 65% { box-shadow: inset -8px -13px 60px -10px rgba(230, 230, 236, 0.2), 44px 35px 20px -20px #687294, 11px 9px 9px -4px #6e799d, inset -100px -70px 40px -110px #6A789C, inset -90px -90px 70px -90px #697398, inset -70px -50px 100px -40px #697398, inset 80px 50px 80px -50px #eeeef3, -25px -15px 30px -10px #F6F6FB; transform: translate(-50%, -50%) scale(1); } } .eye::after { width: 160px; height: 160px; border-radius: 50%; box-shadow: inset -50px -20px 30px 0px #e7e2f5, inset 100px 10px 20px -27px #2f2c4c, 0px 0px 10px 7px rgba(231, 226, 245, 1); animation: pupilAnimationSize 4s cubic-bezier(1, 0, 1, 1) infinite, pupilAnimationView 4s ease infinite; } @keyframes pupilAnimationSize { 0%, 30%, 100% { transform: translate(-50%, -50%) scale(0.85); } 40%, 90% { transform: translate(-50%, -50%) scale(0.5); } } @keyframes pupilAnimationView { 0%, 30%, 100% { box-shadow: inset -50px -20px 30px 0px #e7e2f5, inset 100px 10px 20px -27px #2f2c4c, 0px 0px 10px 7px rgba(231, 226, 245, 1); } 60%, 66% { box-shadow: inset -50px -20px 30px 0px rgba(231, 226, 245, 0), inset 10px 10px 70px -27px rgba(47, 44, 76, 0), 0px 0px 10px 7px hsla(256, 49%, 92%, 0); } 90% { box-shadow: inset -50px -20px 30px 0px #e7e2f5, inset 100px 10px 20px -27px #2f2c4c, 0px 0px 10px 7px rgba(231, 226, 245, 1); } } .circle-1 { width: 475px; height: 475px; border-radius: 50%; border: 1px solid transparent; border-right-color: rgba(223, 228, 255, 0.6); animation: circle1AnimationOpacity 4s ease infinite, circle1AnimationMove 4s ease infinite; } @keyframes circle1AnimationMove { 00%, 100% { transform: translate(-50%, -50%) rotate(49deg); } 07% { transform: translate(-50%, -50%) rotate(38deg); } 12%, 19%, 68% { transform: translate(-50%, -50%) rotate(42deg); } 26%, 30% { transform: translate(-50%, -50%) rotate(82deg); } 73% { transform: translate(-50%, -50%) rotate(34deg); } 87%, 92% { transform: translate(-50%, -50%) rotate(69deg); } 94% { transform: translate(-50%, -50%) rotate(65deg); } } @keyframes circle1AnimationOpacity { 00%, 27%, 73%, 100% { opacity: 1; } 30%, 70% { opacity: 0; } } .circle-2 { width: 475px; height: 475px; border-radius: 50%; border: 1px solid transparent; border-right-color: rgba(223, 228, 255, 0.6); animation: circle2AnimationOpacity 4s ease infinite, circle2AnimationMove 4s ease infinite; } @keyframes circle2AnimationMove { 0%, 100% { transform: translate(-50%, -50%) rotate(229deg); } 9% { transform: translate(-50%, -50%) rotate(220deg); } 14%, 21% { transform: translate(-50%, -50%) rotate(225deg); } 29%, 67% { transform: translate(-50%, -50%) rotate(262deg); } 82% { transform: translate(-50%, -50%) rotate(241deg); } 90%, 94% { transform: translate(-50%, -50%) rotate(249deg); } 99% { transform: translate(-50%, -50%) rotate(245deg); } } @keyframes circle2AnimationOpacity { 0%, 27%, 79%, 100% { opacity: 1; } 30%, 76% { opacity: 0; } } .circle-3 { left: calc(50% + 93px); top: calc(50% - 189px); width: 106px; height: 280px; overflow: hidden; } .circle-3::before { left: -275%; top: -4%; width: 393px; height: 393px; border-radius: 50%; border: 1px solid transp.........完整代码请登录后点击上方下载按钮下载查看
网友评论0