这篇文章主要为大家详细介绍了vue移动端实现红包雨效果,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
本文实例为大家分享了vue实现红包雨效果的具体代码,供大家参考,具体内容如下
下面是代码:
<div class="ser_home"> <ul class="red_packet" id="red_packet"> <li> <i></i></li></ul></div><!-- Add "scoped" attribute to limit CSS to this component only --> .ser_home { width: 100%; height: 100%; } .red_<strong>本文来源gaodai#ma#com搞@@代~&码网</strong>packet { display: block; position: relative; overflow: hidden; width: 100%; height: 100%; i { width: 48px; height: 69px; display: block; background: url('/hongbao.png-600') no-repeat; } li { position: absolute; animation: all 3s linear; top:-100px; z-index: 10; &.move_1 { -webkit-animation: aim_move 5s linear 1 forwards; animation: aim_move 5s linear 1 forwards; } } a { display: block; } } @keyframes aim_move { 0% { -webkit-transform: translateY(0); transform: translateY(0); } 100% { -webkit-transform: translateY(120vh); transform: translateY(120vh); } }
效果图:
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持gaodaima搞代码网。
以上就是vue移动端实现红包雨效果的详细内容,更多请关注gaodaima搞代码网其它相关文章!