效果图:
可播放暂停继续播放,进度条可拖动,时间展示,声音调节
完整代码(直接拿来用)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>audio功能开发</title>
<style>
* {
margin:0;
padding:0
}
.music-range {
width:350px;
height:10px;
background:#2386e4;
border-radius:5px;
-webkit-appearance:none;
margin:0 auto;
cursor:pointer
}
.music-range::-webkit-slider-thumb {
width:15px;
height:15px;
background:#fff;
border:1px solid #f18900;
cursor:pointer;
border-radius:5px;
-webkit-appearance:none
}
a {
text-align:center
}
</style>
</head>
<body>
<div class="music-all">
<audio class='music-audio' co