微信小程序实现音乐播放器(2)

时间:2025-04-07 18:23:10
.music-container{ height: 100%; display: flex; flex-direction: column; align-items: center; background: #2f434e; position: relative; } .music-container .music-name{ margin: 10rpx 0; color: #fff; font-size: 36rpx; } .music-container .music-author{ color: #bbb; font-size: 28rpx; margin: 6rpx 0; } .music-container .arm{ width:204rpx; height: 358rpx; position: relative; left: 72rpx; z-index: 99; transform: rotate(-15deg); transform-origin: 30rpx 30rpx; transition: transform .7s linear; } .disc-container{ position: relative; top: -128rpx; width: 490rpx; height: 490rpx; } .disc-container .disc{ width: 100%; height: 100%; } .disc-container .music-image{ width: 270rpx; height: 270rpx; border-radius: 100%; position: absolute; left: 0;right: 0;top: 0;bottom: 0; margin: auto; } .music-container .arm-reset{ transform: rotate(0deg); } .disc-animate{ animation: rotate 2.5s 1s linear infinite; } @keyframes rotate{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } } .player{ width: 100%; position: absolute; bottom: 60rpx; } .btns{ display: flex; align-items: center; justify-content: space-evenly; } .btns image{ width: 36rpx; height: 36rpx; } .btns .play-btn,.btns .stop-btn{ width: 90rpx; height: 90rpx; }