时间:2020-09-06来源:www.pcxitongcheng.com作者:电脑系统城
实现代码
body{
background:#222;
display:flex;
justify-content:center;
align-items:center;
min-height:100vh;
}
h1{
color:#333;
font-size:8rem;
}
h1:after{
content:"SPOTLIGHT";
color:transparent;
position:absolute;
left:0;
top:0;
background-image: linear-gradient(to right, red,orange,yellow,green,blue,indigo,violet);
background-clip:text;
-webkit-background-clip: text;
clip-path:circle(100px at 0% 50%);
-webkit:circle(100px at 0% 50%);
animation:light 5s infinite;
}
@keyframes light{
0%{
clip-path:circle(100px at 0% 50%);
-webkit:circle(100px at 0% 50%);
}
50%{
clip-path:circle(100px at 100% 50%);
-webkit:circle(100px at 100% 50%);
}
100%{
clip-path:circle(100px at 0% 50%);
-webkit:circle(100px at 0% 50%);
}
}
2023-03-11
vscode文本框怎么设置输入内容与边框的距离?2020-11-18
dns-prefetch是什么 前端优化:DNS预解析提升页面速度2020-10-11
解决搜索框和搜索按钮button边框不能重合的问题