html5带歌词同步的音乐播放器,支持上一首、下一首切换和音量调整,歌曲目录切换等。这是一款黑色质感的mp3音乐播放器代码。
使用方法
1、head引入css文件
<link rel="stylesheet" href="css/style.css"/>2、body引入部分
<div class="container" id="container"> <div class="music"> <div class="photo"> <div class="photo_pic" id="photo_pic"><div class="cd"></div></div> <div class="choose" style="display: none"> <div class="choose_obj choose_like" > <div class="icon" id="icon1"> </div> </div> <div class="choose_obj choose_share"> <div class="icon" id="icon2"> </div> </div> </div> </div> <div class="progress"> <div class="progress_obj clear"> <time class="">00:00</time> <div class="progress_bar" id="progress_bar" style=""><div class="progress_cube" id="progress_cube"></div></div> <time class="">00:00</time> </div> <div class="progress_obj clear"> <div class="ctrl_btn"> <div id="prev_btn" class="prev_btn btn"></div> <div id="play_btn" class="play_btn btn"></div> <div id="next_btn" class="next_btn btn"></div> </div> <div class="ctrl_info"> <div class="vol"><div class="vol_bar" id="vol_bar"><div class="vol_cube" id="vol_cube"></div></div></div> <div class="list" id="list"><div id="list_con"><p>fffffffff</p><p>fffffffff</p><p>fffffffff</p></div></div> </div> <audio src="music/m.mp3"></audio> </div> </div> </div> <div class="lyric"> <div class="lyric_tit" id="lyric_tit"></div> <div class="lyric_con" id="lyric_con"><div id="lyric_txt"></div></div> </div> </div> <script src="js/index.js"></script>