js+css实现自适应全屏音乐播放器代码
代码语言:html
所属分类:多媒体
代码描述:js+css实现自适应全屏音乐播放器代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <style> html{width: 100%; height: 100%;} *{box-sizing: border-box;} body{padding: 0; margin: 0;background-image: radial-gradient(#4e5051, #4e5051, #2e3235); width: 100%; height: 100%;background-repeat: no-repeat;} .audio_main{ height: 100vh;} .audio_title{text-align: center;padding: 10px 0;} .audio_title .audio_bt{font-size: 16px;color: #fff;font-weight: bold; margin-bottom: 5px;} .audio_title .audio_tag{color: #a3a3a3;} .audio_main_center{display: flex;flex-direction: column; height:calc(100% - 67px); justify-content: space-around;} .audio_path .audio_bg{background: #414344; padding: 20px; border-radius: 50%;width: 260px; height: 260px; overflow: hidden; margin: 0 auto;} .audio_path .audio_bg img{border-radius: 50%; width: 100%; height: 100%;} .audio_path .audio_bg.active img{animation: 10s animationName infinite linear;} .audio_info{margin-bottom: 20px;} .audio_info .audio_info_title{color: #fff;font-size: 16px;font-weight: bold; margin-bottom: 5px;} .audio_info .audio_info_tag{display: flex;color: #a3a3a3;} .audio_info .audio_info_tag span{display: flex; background: #bfe8ff;color: #587ccc;font-size: 11px; align-items: center; justify-content: center; border-radius: 10px; padding: 0px 8px; margin-right: 5px;} .audio_silder{padding: 0px 15px;} .audio_silder .silder{background: #fff; border-radius: 20px;width: 100%; height: 4px; position: relative; margin-bottom: 10px;} .audio_silder .silder_color{height: 4px; border-radius: 20px; background: #20c6a3;width: 0;} .audio_silder .silder_box{width: 10px; height: 10px; border-radius: 50%; background: #fff; position: absolute; top: -3px;left: 0;} .audio_silder .silder_tiem{display: flex;justify-content: space-between;color: #fff;font-size: 12px; margin-bottom: 20px;} .audio_play .play_stop{background: #20c6a3;width: 60px; height: 60px; border-radius: 50%; margin: 0 auto;overflow: hidden;display: flex; align-items: center; justify-content: center;} .audio_play .play_icon{background: #20c6a3;width: 60px; height: 60px; border-radius: 50%; margin: 0 auto;overflow: hidden;display: flex; align-items: center; justify-content: center;} .audio_play .play_icon span{display: block;background: url('//repo.bfw.wiki/bfwrepo/icon/662b81d53f301.png') no-repeat; background-size: 100%;width: 25px; height: 25px; overflow: hidden; margin-left:3px;} .audio_play .play_stop span{display: block;background: url('//repo.bfw.wiki/bfwrepo/icon/662b81df3cc98.png') no-repeat; background-size: 100%;width: 25px; height: 25px; overflow: hidden;} .audio_play .play_icon img{margin-left: 5px;} .audio_play img{width: 80%; height: 80%;} .audio_flex{position: fixed; left: 0; bottom: 0;width: 100%; background: #fff;display: flex; justify-content: space-between; padding: 10px 15px;} .audio_flex .audio_flex_left{display: flex;} .audio_flex .audio_flex_left .logo{width: 40px; height: 40px; overflow: hidden; background:#20c6a3 ;} .audio_flex .audio_flex_left .infos_text{padding-left: 10px;} .audio_flex .audio_flex_left .infos_text .bt{font-size: 14px; color: #333;} .audio_flex .audio_flex_left .infos_text .texts{font-size: 12px;color: #666;} .audio_flex .audio_flex_right a{display: flex;width: 100px; height: 36px; background: #20c6a3; border-radius: 20px; font-size: 14px; color: #fff; align-items: center; justify-content: center;text-decoration: unset;} /*动画*/ @keyframes animationName{ 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> </head> <body> <div class="audio_main"> <div class="audio_title"> <div class="audio_bt">不是因为寂寞才想你- T.R.Y.</div> <div class="audio_tag">T.R.Y</div> </div> <div class="audio_main_center"> <div class="audio_path"> <div class="audio_bg" id="animationBox"> <div class="audio_img"><img src="//repo.bfw.wiki/bfwrepo/image/5ef9ef9fbf5b0.png"></div> </div> </div> <div class="audio_silder"> <div class="audio_info"> <div class="audio_info_title">不是因为寂寞才想你- T.R.Y.</d.........完整代码请登录后点击上方下载按钮下载查看
网友评论0