纯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%;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0