html响应式音乐播放器,简约风格的响应式音乐播放器

CSS

语言:

CSSSCSS

确定

@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700);

body {

font-family: 'Roboto', sans-serif;

background: #7fe5a3;

overflow: hidden;

}

audio {

position: absolute;

}

h2 {

font-size: 18px;

font-weight: 700;

}

h3 {

font-size: 16px;

font-weight: 400;

}

p {

display: inline-block;

font-size: 14px;

font-weight: 400;

margin-bottom: 10px;

color: grey;

}

.audio-player {

position: absolute;

top: 50%;

left: 50%;

transform: translate(-50%, -50%);

display: flex;

flex-direction: column;

justify-content: space-around;

transition: all 0.2s;

width: 80vw;

max-width: 700px;

background: white;

box-sizing: border-box;

}

@media screen and (max-width: 560px) {

.audio-player {

width: 100vw;

background: white;

}

}

.info {

flex: 1;

padding: 16px 30px;

}

.cover-art {

position: absolute;

bottom: 160px;

right: -30px;

width: 230px;

height: 230px;

background: url(http://images.fnewsmagazine.com/2012/02/veronica-falls-album-cover.jpg);

background-size: cover;

transition: all 0.2s;

}

@media screen and (max-width: 560px) {

.cover-art {

position: relative;

width: 100%;

height: 80vw;

bottom: inherit;

right: inherit;

}

}

@media screen and (max-width: 520px) {

.cover-art {

position: relative;

width: 100%;

height: 90vw;

bottom: inherit;

right: inherit;

}

}

@media screen and (max-height: 500px) {

.cover-art {

display: none;

width: 0px;

height: 0px;

}

}

.cover-art a {

display: block;

width: 100%;

height: 100%;

}

.cover-art a:hover {

background: #22a952;

opacity: 0.2;

}

.controls {

display: flex;

width: 100%;

height: 100px;

background: white;

margin-top: -1px;

padding: 20px;

box-sizing: border-box;

transition: all 0.2s;

}

.controls_plays {

flex: 2;

display: flex;

justify-content: space-around;

}

.controls_player {

flex: 1;

fill: #7FE5A3;

display: flex;

justify-content: space-around;

}

@media screen and (max-width: 420px) {

.controls {

flex-direction: column;

height: 200px;

}

}

#plays_btn,

#prev_btn,

#next_btn {

cursor: pointer;

width: 26px;

max-width: 18px;

transition: all 0.2s;

}

#plays_btn:hover,

#prev_btn:hover,

#next_btn:hover {

fill: #565349;

}

#pause_btn {

display: none;

}

#volume_btn,

#shuffle_btn,

#playlist_btn {

cursor: pointer;

width: 23px;

max-width: 18px;

transition: all 0.2s;

}

#volume_btn:hover,

#shuffle_btn:hover,

#playlist_btn:hover {

fill: #22a952;

}

.progressbar_slide {

width: 100%;

background: #7fe5a3;

height: 6px;

}

.progressbar_range {

width: 0;

background: black;

height: 6px;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值