纯css打造的灯管文字闪耀效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> LIGHT Flickering Animation (Vanilla CSS)</title> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Montserrat:600'> <style> :root { --white:#f1f1f1 } body { margin: 0; font-family: Montserrat; font-size: 40px; color: var(--white); letter-spacing: 0.7em; background-color: black; display: flex; justify-content: center; align-items: center; height: 100vh; } div > span { opacity: 0.15; } #I { opacity: 1; animation: flickerI 2s linear reverse infinite; } #I::after { content: ''; width: 150%; -webkit-box-shadow: -35px 0px 60px 8px rgba(255,255,255,1); -moz-box-shadow: -35px 0px 60px 8px rgba(255,255,255,1); box-shadow: -35px 0px 60px 8px rgba(255,255,255,1); } #L, #G { animation: flickerLG 2s linear reverse infinite; position: relative; } #L::after, #L::before { content:' '; width: 100px; height: 100px; background: var(--white); position: absolute; top: -50%; left: 100%; border-radius: 100%; opacity: 0.05; filter: blur(10px); } #L::after { width: 200px; height: 200px; top: -150%; left: -5%; opacity: 0.1; filter: blur(10px); } #H { animation: flickerH 2s linear reverse infinite } #T { animation: flickerH 2s linear reverse infinite } @keyframes flickerI { 0% { opacity: 0.4; } 5% { opacity: 0.5; } 10% { opacity: 0.6; } 15% { opacity: 0.85; } 25% { opacity: 0.5; } 30% { opacity: 1; } 35% { opacity: 0.1; } 40% { opacity: 0.25; } 45% { opacity: 0.5; } 60% { opacity: 1; } 70% { .........完整代码请登录后点击上方下载按钮下载查看
网友评论0