<section>
<div class="container">
<h1 data-text="CIFAR">CIFAR</h1>
</div>
</section>
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ... </head>
<body>
</body>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
font-family: "Nunito";
}
body {
background-color: #09111b;
}
:root {
--var-color: rgb(0, 238, 255);
}
section {
height: 100vh;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: #09111b;
}
.container h1 {
font-size: 20vw;
color: var(--var-color);
position: relative;
}
.container h1::before {
position: absolute;
content: attr(data-text);
text-shadow: 0px 0px 20px var(--var-color);
filter: blur(10px) brightness(0);
animation: flicker 4s linear forwards;
/* animation-delay: 2s; */
animation-iteration-count: infinite;
}
@keyframes flicker {
0% {
filter: blur(10px) brightness(0);
}
29% {
filter: blur(10px) brightness(0);
}
30% {
filter: blur(5px) brightness(1);
}
32% {
filter: blur(5px) brightness(0);
}
33% {
filter: blur(5px) brightness(0);
}
35% {
filter: blur(5px) brightness(1);
}
37% {
filter: blur(5px) brightness(0);
}
38% {
filter: blur(5px) brightness(1);
}
39% {
filter: blur(5px) brightness(0);
}
40% {
filter: blur(5px) brightness(1);
}
48% {
filter: blur(5px) brightness(1);
}
59% {
filter: blur(5px) brightness(0);
}
70% {
filter: blur(5px) brightness(1);
}
100% {
filter: blur(5px) brightness(1);
}
}
预览
控制台