迷你音乐播放器
代码语言:html
所属分类:多媒体
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.icon {
display: inline-block;
width: 2em;
height: 2em;
font-size: 30px;
fill: #D7DCE2;
transition: all .2s ease-in-out;
}
html, body {
height: 100%;
}
body {
background: #ffeff5;
position: relative;
}
.player {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.player.play .player__timeline {
-webkit-transform: translateY(-90%);
transform: translateY(-90%);
}
.player.play .player__album:after {
box-shadow: 0px 30px 28px -10px rgba(0, 0, 0, 0.2);
}
.player.play .player__album {
top: -65px;
}
.player.play .pause {
display: inline-block;
}
.player.play .play {
display: none;
}
.player__album {
width: 112px;
height: 112px;
border-radius: 50%;
margin-right: 22px;
position: relative;
top: -50px;
transition: all .4s ease-in-out;
}
.player__album:before {
content: '';
width: 25px;
height: 25px;
position: absolute;
z-index: 3;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background: #fff;
border-radius: 50%;
}
.player__album:after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 50%;
box-shadow: none;
transition: all .3s ease-in-out;
}
.player__albumImg {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
width: 100%;
height: 100%;
border-radius: 50%;
position: relative;
z-index: 2;
display: none;
}
.player__albumImg.active-song {
display: block;
}
.player__bar {
background: #fff;
padding: 10px 25px;
height: 100px;
display: flex;
justify-content: space-between;
border-radius: 15px;
box-shadow: 0 30px 56px 6px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 3;
}
.player.........完整代码请登录后点击上方下载按钮下载查看
网友评论0