jquery实现全屏带歌词播放列表音乐播放器代码

代码语言:html

所属分类:多媒体

代码描述:jquery实现全屏带歌词播放列表音乐播放器代码,绿色简洁大气,显示歌曲封面、歌手、歌词、进度条、多个歌曲播放列表选择。

代码标签: jquery 全屏 歌词 播放 列表 音乐 播放器 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
 /*
inline类元素会有默认的4像素空格
*/


*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

i,em,strong,u,b{
    font-style: normal;
}
img{
    border: none;
    vertical-align: top;
}
ul,ol{
    list-style: none;
}
a{
    text-decoration: none;
}
button,input,textarea{
    border: none;
    outline: none;
}

/*或写成 html:root,因为:root指向的就是html根目录*/
/* :root{
    --width:10px;
    --borderRadius:5px;
*/


/*设置滚动条样式*/
.scrollbar{
    overflow-y: scroll;
    /*兼容IE*/
    -ms-scrollbar-arrow-color: rgba(10, 133, 106, 0.1);/*三角箭头的颜色*/
    -ms-scrollbar-face-color:rgba(10, 133, 106,0.5);/*滚动条滑块按钮的颜色*/
    -ms-scrollbar-highlight-color: rgba(10, 133, 106, 0.1);/*滚动条整体颜色*/
    -ms-scrollbar-base-color:rgba(10, 133, 106, 0.1);/*滚动条基准颜色*/
    /* scrollbar-track-color:transparent; *//*滚动条轨道颜色*/

    /*以下两个仅适用于火狐,而且是Firefox 68.0开始支持(2018年12月11日正式发布)*/
    scrollbar-color: rgba(0,0,0,.2) transparent;
    scrollbar-width: thin;
}

/*webkit系列:Chrome、现版Opera、2020新版Microsoft Edge、Safari*/
.scrollbar::-webkit-scrollbar{
    width: 6px;
    border-radius: 3px;
    background-color: transparent;
}
.scrollbar::-webkit-scrollbar-thumb{
    width: 6px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, .2);
}

/*兼容早期Opera*/
.scrollbar::-o-scrollbar{
    width: 6px;
    border-radius: 3px;
    background-color: transparent;
}
.scrollbar::-o-scrollbar-thumb{
    width: 6px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, .2);
}


html,body{
    width: 100%;
    max-width: 2000px;
    min-width: 1240px;
    height: 100%;
    max-height: 900px;
    margin:0 auto;
    overflow: hidden;
}

body{
    font: 16px Helvetica;
    background:#f5f5f5;

}




div.confirm-add{
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    width: 520px;
    background-color: #fff;
    box-shadow: 0 0 4px rgb(197, 189, 189,.8);
    z-index: 1000;
    opacity: 0;
    margin-top:-50%;
}

div.confirm-add>i.confirm-close{
    position: absolute;
    right: 20px;
    top: 20px;
    width: 1.5px;
    height:14px;
    cursor: pointer;
}

i.confirm-close:hover::before,i.confirm-close:hover::after{
    background-color:#08cc67;
}

i.confirm-close::before,i.confirm-close::after{
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height:100%;
    background-color: #aaa;
    transition: .2s;
}
i.confirm-close::before{
    transform: translateY(-50%) rotate(45deg);
}
i.confirm-close::after{
    transform: translateY(-50%) rotate(-45deg);
}


div.confirm-add>h3.confirm-headline{
    padding: 18px 0;
    color: #424242;
    font-weight: 500;
    font-size: 15px;
    text-align: center;
    border-bottom: .5px solid #eee;
}
div.confirm-add>div.confirm-content{
    padding: 27px 0 32px 0;
    font-size: 14px;
    color: #525252;
}
div.confirm-content i.confirm-icon{
    position: relative;
    display: inline-block;
    width: 50px;
    height: 50px;
    margin-left: 46px;
    margin-right: 20px;
    border-radius: 50%;
    vertical-align: middle;
    background-color:#08cc67;
}
i.confirm-icon::before,i.confirm-icon::after{
    content: "";
    position: absolute;
    left: 50%;
    width: 5px;
    background-color: #fff;
}
i.confirm-icon::before{
    top: 14px;
    height: 5px;
    border-radius: 50%;
    transform: translate(-50%);
}
i.confirm-icon::after{
    top: 21px;
    height: 14px;
    border-radius: 2.5px;
    transform: translate(-50%);
}

div.confirm-add div.confirm-ctrl{
    
    display: flex;
    display: -ms-flex;
    display: -webkit-flex;
    justify-content: center;
    padding-bottom: 26px;
}

div.confirm-ctrl i{
    display: block;
    width: 130px;
    height: 36px;
    border-radius: 2px;
    text-align: center;
    line-height: 36px;
    font-size: 14px;
    cursor: pointer;
    transition: .3s;
}

div.confirm-ctrl i.centain-btn{
    background-color:#08cc67;
    color: #fff;
}

div.confirm-ctrl i.centain-btn:hover{
    filter: brightness(120%);
    -webkit-filter: brightness(120%);
}

div.confirm-ctrl i.cancal-btn{
    margin-left: 14px;
    border: 1px solid #aaa;
    color: #424242;
}
div.confirm-ctrl i.cancal-btn:hover{
    background-color:rgba(177, 153, 153, 0.091)
}




h1.website-title{

    display: flex;
    display: -ms-flex;
    display: -webkit-flex;
    padding: 8px 0;
    background-color: #08cc67;
    font-size: 20px;
    font-weight: 400;
    filter: drop-shadow(0 4px 7px #ddd);
    -webkit-filter: drop-shadow(0 4px 7px #ddd);
    cursor: pointer;

}

h1.website-title .my-icon-wrapper{
    display: flex;
    display: -ms-flex;
    display: -webkit-flex;
    align-items: center;
    margin-left: 30px;
    cursor: pointer;
}
.my-icon-wrapper>i.my-icon{
    display: block;
    width: 40px;
    height: 40px;
    margin-right: 11px;
    background-image: url('//repo.bfw.wiki/bfwrepo/images/musicplayer/css_sprites.png');
    background-size: 120px 80px;
    background-position:-80px 0;
}

.my-icon-wrapper>em.player-name{
    font: 600 18px 'arial';
    color:#f1f1f1;
}



/*主内容区*/

.main-interface{
    display: flex;
    justify-content: space-between;
    height: calc(100% - 162px);
    margin: 14px 0;
    overflow: hidden;
}
.main-interface .interface-nav{
    width: 300px;
    height: 100%;
    padding: 1% 0;
    background-color: #fefeff;
    color: #322222;
    border-radius: 0 12px 12px 0;
}

.main-interface .interface-content{
    width: calc(100% - 320px);
    height: 100%;
    background-color: #fefeff;
    border-radius: 12px 0 0 12px; 
}





.player-container{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: calc(100% - 78px);
    transform-origin: left bottom;
    transition:transform .3s,opacity .2s;
    overflow: hidden;
    z-index: 10;

}
.player-container.slidedown{
    /* top: calc(100% - 78px); */
    transform: scale(0);
    opacity: 0;
}

.player-container div.bg-shadow{
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    background-color:hsla(0,0%,100%,1);

}

.player-container .player-body{

    position: absolute;
    left: 50%;
    top: 0;
    display: flex;
    display: -ms-flex;
    display: -webkit-flex;
    margin: auto;
    width:1200px;
    height: 100%;
    transform: translate(-50%);

}

.player-container .fullscreen-btn{

    position: absolute;
    right: 30px;
    top: 20px;
    width: 38px;
    height: 38px;
    transition:.2s;
    cursor: pointer;
}
.player-container .fullscreen-btn:hover{
    -webkit-filter: brightness(130%);
    filter: brightness(130%);
}
.player-container .fullscreen-btn:hover svg>path{
    fill: #08cc67;
}


.player-body .playbill{
    display: flex;
    display: -ms-flex;
    display: -webkit-flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    -ms-flex: 1;
    -webkit-flex: 1;
    height: 100%;
}
.player-body .lyric{
    display: flex;
    display: -ms-flex;
    display: -webkit-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    -ms-flex: 1;
    -webkit-flex: 1;
    height:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0