微信小程序开发之——婚礼邀请函-邀请函页面(4

本文介绍如何使用微信小程序开发一款婚礼邀请函应用,包括样式文件`index.wxss`的设计,如播放器样式和背景设置,以及功能逻辑文件`index.js`的实现,涉及音乐播放控制和页面交互。
摘要由CSDN通过智能技术生成

李四

新娘

我们诚邀您来参加我们的婚礼

事件:2020年12月30日

地点:北京市海淀区XX路XX酒店

3.2 样式文件(pages/index/index.wxss)

/*播放器 */

.player{

position: fixed; top: 20rpx;right: 20rpx;

z-index: 1;

}

.player>image:first-child{

width: 80rpx;height: 80rpx;

animation: musicRotate 3s linear infinite;

}

.player>image:last-child{

width: 28rpx; height: 80rpx; margin-left: -5px;

}

@keyframes musicRotate{

from{transform:rotate(0deg);}

to{transform: rotate(360deg);}

}

/* 播放暂停 */

.player-play>image:first-child{

animation-play-state: running;

}

.player-play>image:last-child{

animation: musicStart 0.2s linear forwards;

}

.player-pause>image:first-child{

animation-play-state: paused;

}

.player-pause>image:last-child{

animation: musicStop 0.2s linear forwards;

}

@keyframes musicStart{

from{transform: rotate(0deg);}

to {transform: rotate(20deg);}

}

@keyframes musicStop{

from{transform: rotate(20deg);}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值