网络编程
位置:首页>> 网络编程>> JavaScript>> 微信小程序按钮点击动画效果的实现

微信小程序按钮点击动画效果的实现

作者:CodeHunter_qcy  发布时间:2023-08-26 03:22:21 

标签:微信小程序,按钮,点击,动画

动画效果如下:

微信小程序按钮点击动画效果的实现

GIF看起来可能会有点卡

wxml


<view class="confirm bubble">确定</view>

wxss


.confirm{
width: 325rpx;
height: 80rpx;
background: #07c160;
border-radius: 6rpx;
font-size: 30rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
.bubble{
position: relative;
overflow: hidden;
}
.bubble:after{
content: "";
background: #999;
position: absolute;
width: 750rpx;
height: 750rpx;
left: calc(50% - 375rpx);
top: calc(50% - 375rpx);
opacity: 0;
margin: auto;
border-radius: 50%;
transform: scale(1);
transition: all 0.4s ease-in-out;
}
.bubble:active:after {
transform: scale(0);
opacity: 1;
transition: 0s;
}

总结

以上所述是小编给大家介绍的微信小程序按钮点击动画效果的实现,希望对大家有所帮助

来源:https://blog.csdn.net/qq_43390235/article/details/90668649

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com