时间:2020-09-06来源:www.pcxitongcheng.com作者:电脑系统城
实现代码
.light-btn {
text-decoration: none;
position: absolute;
left: 50%;
top: 80%;
transform: translate(-50%, -50%);
font-size: 24px;
background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
background-size: 400%;
width: 400px;
height: 100px;
line-height: 100px;
color: #fff;
text-align: center;
text-transform: uppercase;
border-radius: 50px;
z-index: 1;
}
.light-btn:hover::before,
.light-btn:hover {
animation: sun 2s linear infinite;
}
.light-btn::before {
content: '';
position: absolute;
left: -5px;
right: -5px;
top: -5px;
bottom: -5px;
background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
background-size: 400%;
border-radius: 50px;
filter: blur(10px);
z-index: -1;
animation: sun 12s linear infinite;
}
@keyframes sun {
100% {
background-position: -400% 0;
}
}
2023-03-11
vscode文本框怎么设置输入内容与边框的距离?2020-11-18
dns-prefetch是什么 前端优化:DNS预解析提升页面速度2020-10-11
解决搜索框和搜索按钮button边框不能重合的问题