文字烟雾效果按钮

开发工具:DW
关键技术:CSS

HTML代码部分:
<button class="button26">
<span>
<h2 index="1">烟</h2>
<h2 index="2">雾</h2>
<h2 index="3">效</h2>
<h2 index="4">果</h2>
</span>
</button>
CSS部分:
.button26 h2{
transition: .4s;
display: inline-block;
font-style:normal;
color:#FFFFFF;
font-weight: 400;
}
.button26{
margin-left: 41.5%;
margin-top: 20%;
background-color: #2F3545;
}
.button26:hover h2{
animation: button26 1s 0ms 1 forwards;
}
@keyframes button26 {
0%{
filter: blur(0px);
opacity: 1;
transform: translateY(0px);
}
50%{
filter: blur(3px);
opacity: 0;
transform: translateY(-10px) translateX(8px);
}
52%{
transform: translateY(0px) translateX(-10px);
}
100%{
filter: blur(0px);
opacity: 1;
}
}
.button26 i[index='2']{
animation-delay: 50ms;
}
.button26 i[index='3']{
animation-delay: 100ms;
}
.button26 i[index='4']{
animation-delay: 150ms;
}
.button26{
width: 248px;
height: 60px;
border-radius: 25px;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
filter: blur(0px);主要这个属性设置羽化效果像素越大羽化效果越大。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值