css+js实现中性简洁音乐播放器效果代码
代码语言:html
所属分类:多媒体
代码描述:css+js实现中性简洁音乐播放器效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Acme&display=swap");
html {
font-size: 10px;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background-color: #E5F3FE;
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
letter-spacing: 1px;
font-family: 'Acme', sans-serif;
}
.player {
height: 35rem;
width: 60rem;
background: #E5F3FE;
box-shadow: 5px 5px 10px #cee3f2, -5px -5px 10px #faffff;
border-radius: 11rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.song-heading .title {
font-size: 2rem;
font-weight: 600;
color: #5881F3;
letter-spacing: 0.4px;
}
.song-heading .album-name {
text-align: center;
font-size: 1.5rem;
margin-top: 1rem;
font-weight: 600;
color: #858b90;
}
.music-controls {
display: flex;
width: 95%;
justify-content: space-evenly;
align-items: center;
}
.music-controls .repeat {
cursor: pointer;
width: 3rem;
height: 3rem;
}
.music-controls .repeat svg {
transform: rotate(45deg);
}
.music-controls .repeat path {
fill: #5C87FE;
}
.music-controls .previous, .music-controls .next {
cursor: pointer;
width: 6rem;
height: 6rem;
box-shadow: 5px 5px 10px #cee3f2, -5px -5px 10px #faffff;
padding: 1rem;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
.music-controls .previous.pressed, .music-controls .next.pressed {
box-shadow: inset 5px 5px 10px #cee3f2, inset -5px -5px 10px #faffff;
}
.music-controls .previous svg, .music-controls .next svg {
width: 2rem;
height: 2rem;
}
.music-controls .previous svg path, .music-controls .next svg path {
fill: #5C87FE;
}
.music-controls .previous svg rect, .music-controls .next svg rect {
fill: #5C87FE;
}
.music-controls .play {
cursor: pointer;
background-color: #5C87FE;
padding: 2rem;
border-radius: 50%;
display: flex;
align-items: center;
box-shadow: 6px 5px 9px 0px #a5c6ec;
}
.music-controls .play svg {
width: 4rem;
height: 4rem;
}
.music-controls .play svg path {
fill: #fff;
}
.music-controls .play.pressed {
box-shadow: none;
}
.music-controls .favorite {
cursor: pointer;
}
.music-controls .favorite.pressed svg path {
fill: #e74c3c;
}
.audio-control {
width: 85%;
height: 6px;
border-radius: 2px;
background: #E5F3FE;
box-shadow: 5px 5px 7px 0px #c7dcec, -7px -7px 8px #f2ffff;
margin: 4px auto;
cursor: pointer;
margin-top: 20px;
}
.audio-control .audio-progress {
width: 20%;
height: 100%;
border-radius: 2px;
position: relative;
background-color: #5C87FE;
}
.audio-control .audio-progress:after {
content: "";
width: 7px;
height: 7px;
border-radius: 50%;
border: 3px solid #5C87FE;
background-color: #fff;
position: absolute;
top: -4px;
right: -5px;
}
.audio-duration {
margin-top: -30px;
display: flex;
width: 84%;
font-size: 1.4rem;
font-weight: 600;
color: #A1A1A1;
letter-spacing: 1px;
}
.audio-duration .start {
flex: 1;
}
.edge {
width: 10rem;
height: 7px;
background: #E5F3FE;
border-radius: 10px;
box-shadow: 5px 5px 7px 0px #c7dcec, -7px -7px 8px #f2f.........完整代码请登录后点击上方下载按钮下载查看
网友评论0