CSS3 彩色渐变动效按钮
2024-09-06 15:42:36
<!DOCTYPE html>
<html>
<head>
<title>Crayon Animate</title>
<style type="text/css">
body {
background-color: #747474;
}
.yam-don-button {
width: 300px;
margin-top: 100px!important;
}
.yam-don-button {
position: relative;
display: block;
background: #fff;
border: none;
border-radius: 100px;
box-shadow: 0 24px 50px -20px rgba(0,0,0,.5);
margin: 15px auto 0;
min-width: 250px;
line-height: 60px;
font-size: 24px;
text-decoration: none;
text-align: center;
vertical-align: middle;
color: #fff;
white-space: wrap;
z-index: 2;
cursor: pointer;
}
.yam-don-heart {
position: relative;
vertical-align: top;
z-index: 1;
display: inline-block;
margin-right: 15px;
color: #fff;
font-size: 33px;
text-shadow: none;
}
.btn-sponsor-red .yam-don-heart:before {
background: linear-gradient(90deg,#f36,#61c2f0,#f441a5,#ffeb3b,#f36);
background-size: 500%;
content: "";
position: absolute;
top: 15px;
left: -3px;
right: 0;
bottom: 15px;
z-index: -1;
filter: blur(10px);
animation: crayonAnimate 28s linear infinite;
}
.yam-don-button:before {
display: block;
background: linear-gradient(90deg,#f36,#61c2f0,#f441a5,#ffeb3b,#f36);
background-size: 500%;
border-radius: 100px;
content: "";
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
z-index: -1;
opacity: .8;
filter: blur(10px);
animation: crayonAnimate 28s linear infinite;
transition: all .35s;
}
.btn-sponsor-blue:before {
background: linear-gradient(90deg,#00a2e4,#a7cd6b,#00a2e4,#a7cd6b,#00a2e4);
background-size: 500%;
}
.yam-don-button:hover:before {
top: -8px;
left: -8px;
right: -8px;
bottom: -8px;
opacity: 1;
animation: crayonAnimate 8s linear infinite;
}
@keyframes crayonAnimate {
from {background-position:0}
to {background-position:500%}
}
</style>
</head>
<body>
<a href="#" class="yam-don-button btn-sponsor-blue" target="_blank">
<span class="yam-don-heart">♥</span>立即点赞
</a>
<a href="#" class="yam-don-button btn-sponsor-red" target="_blank">
<span class="yam-don-heart">♥</span>立即点赞
</a>
</body>
</html>
最新文章
- Linux命令学习总结:rm命令
- fnciton
- gcd 最小公约数
- android 退出机制
- 58. N-Queens &;&; N-Queens II
- nginx是一个反向代理的软件
- 编辑器之神VIM 总结(一) 基础部分
- 怎么学习C++?
- JAXB - The JAXB Context
- [WPF疑难]如何禁用WPF窗口的系统菜单(SystemMenu)
- 洛谷 [P1314] 聪明的质检员(NOIP2011 D2T2)
- 微信公众平台开发——为何不能在网页调用微信jsapi?
- Django Rest framework基础使用之 serializer
- jquery 获取表单的内容以JSON对象形式返回
- Tomcat7/8访问Server Status、Manager App、Host Manager出现403 forbidden
- 使用 cmake 进行交叉编译
- Winform自定义控件实例
- Angular CLI 使用教程指南参考
- Elasticsearch之集群脑裂
- nginx的配置文件解析
热门文章
- More Effective C++: 05技术(25-28)
- 阿里云发布敏感数据保护产品SDDP,数据贴身防护实现“外防内控”
- 为什么printf()用%f输出double型,而scanf却用%lf呢?
- 【JZOJ4832】【NOIP2016提高A组集训第3场10.31】高维宇宙
- 【JZOJ4817】【NOIP2016提高A组五校联考4】square
- Redis 设置密码登录
- axios细节之绑定到原型和axios的defaults的配置属性
- UVa 10220 【大整数】
- 瑞星推国内唯一Linux系统杀毒软件 国产操作系统还需国产安全软件保护
- 【牛腩视频】之SQL触发器 标签: 数据库 2015-05-23 09:44 1339人阅读 评论(40) 收藏