css实现文字霓虹灯闪动效果
代码语言:html
所属分类:动画
代码描述:css实现文字霓虹灯闪动效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Poppins:900&display=swap"); body { background-color: black; margin: 5rem 6rem; text-align: center; font-family: 'Poppins', 'sans-serif'; } h1, h2 { margin: 0; padding: 0; color: white; display: inline-block; font-size: 10rem; text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073, 0 0 40px #e60073, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073; } h2 { font-size: 8rem; } h1:nth-child(0n + 0), h2:nth-child(5n + 0) { -webkit-animation-name: animateGlithcy; animation-name: animateGlithcy; -webkit-animation-delay: 0s; animation-delay: 0s; -webkit-animation-duration: 0s; animation-duration: 0s; -webkit-animation-timing-function: linear; animation-timing-function: linear; animation-direction: alternate-reverse; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } h1:nth-child(0n + 1), h2:nth-child(5n + 1) { -webkit-animation-name: animateGlithcy; animation-name: animateGlithcy; -webkit-animation-delay: 0.2s; animation-delay: 0.2s; -webkit-animation-duration: 0.5s; animation-duration: 0.5s; -webkit-animation-timing-function: linear; animation-timing-function: linear; animation-direction: alternate-reverse; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } h1:nth-child(0n + 2), h2:nth-child(5n + 2) { -webkit-animation-name: animateGlithcy; animation-name: animateGlithcy; -webkit-animation-delay: 0.4s; animation-delay: 0.4s; -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-timing-function: linear; animation-timing-function: linear; animation-direction: alternate-reverse; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } h1:nth-child(0n + 3), h2:nth-child(5n + 3) { -webkit-animation-name: animateGlithcy; animation-name: animateGlithcy; -webkit-animation-delay: 0.6s; animation-delay: 0.6s; -webkit-animation-duration: 1.5s; animation-duration: 1.5s; -webkit-animation-timing-function: linear; animation-timing-function: linear; animation-direction: alternate-reverse; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } h1:nth-child(0n + 4), h2:nth-child(5n + 4) { -webkit-animation-name: animateGlithcy; animation-name: animateGlithcy; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0