《涛声依旧》 毛宁
<style>#bigPa { position: relative; left:- 100px; width: 800px; height: 450px; background:#333 url('https://pic.imgdb.cn/item/621385512ab3f51d91a35036.jpg') no-repeat center/cover; box-shadow: 0 0 0 2px #111;}
#gcDiv { width: 500px; float: right; column-count:2; color: #eee; font-size: 1em; text-shadow: 1px 1px 1px #111; }
#paDiv { position: relative; left: 10px; top: 10px; width: 220px; display: flex; align-items: center; border: 1px solid olive; border-radius: 8px 0px 8px 0px; background: rgba(0,0,0,.8); box-shadow: 1px 1px 2px #000; }
#jindu { position: relative; width: 200px; height: 8px; line-height: 8px; font-size: 10px; color: #eee; text-align: center; background: linear-gradient(90deg, olive, green) no-repeat; background-size: 8px 0px; cursor: pointer; }
#btn-ro { width: 20px; height: 20px; line-height: 20px; font-size: 12px; background: linear-gradient(blue, silver, red); outline:none; color: white; border-radius: 50%; text-align: center; cursor: pointer; animation: rol linear 2s infinite; }
#btn-ro:hover { opacity: 0.8; }
#btn-ro:active { opacity: 1; }
@keyframes rol { to { transform:rotate(360deg); } }
</style>
<div id="bigPa">
<div id="paDiv">
<div id="btn-ro">·</div>
<div id="jindu">
<div id="jd-go"></div>
</div>
</div>
</div>
</div>
<script language="javascript">
var btn = document.getElementById('btn-ro');
var jindu = document.getElementById('jindu');
var aud = document.createElement('audio');
aud.loop = true;
// 音乐地址放在下行引号内
aud.src = "https://www.joy127.com/url/88692.mp3";
aud.addEventListener('ended', function() { btn.style.animationPlayState="paused"; }, true);
aud.addEventListener('timeupdate', tmMsg, true);
aud.play();
function tmMsg(){ //进度条
let auT = Math.floor(aud.duration - aud.currentTime);
let auM = auT / 60;
let auMs = parseInt(auM);
if (auMs <10) auMs = "0" + auMs;
let auS = auT % 60;
let auSs = Math.round(auS);
if (auSs < 10) auSs = "0" + auSs;
jindu.innerHTML = "- " + auMs +":" + auSs;
let jd = (100*aud.currentTime)/aud.duration;
jindu.style.backgroundSize = jd+ "% 8px";
}
jindu.onclick = function(){ //进度控制
let w = offset(jindu,"left");
let x = (event.clientX - w) * aud.duration / jindu.clientWidth;
aud.currentTime = x;
}
function offset(obj,direction){//获取父级元素偏移总量
let offsetDir = "offset" + direction.toUpperCase()+direction.substring(1);
let realNum = obj;
let positionParent = obj.offsetParent;
while(positionParent != null){
realNum += positionParent;
positionParent = positionParent.offsetParent;
}
return realNum;
}
btn.onclick = function(){ // 暂停&播放
aud.paused ? (aud.play(), btn.style.animationPlayState="running") : (aud.pause(), btn.style.animationPlayState="paused");
}
</script>
涛声依旧-毛宁歌词
带走一盏渔火 让他温暖我的双眼留下一段真情 让它停泊在枫桥边无助的我 已经疏远了那份情感许多年以后才发觉 又回到你面前留连的钟声 还在敲打我的无眠尘封的日子 始终不会是一片云烟久违的你 一定保存着那张笑脸许多年以后 能不能接受彼此的改变月落乌啼总是千年的风霜涛声依旧不见当初的夜晚今天的你我 怎样重复昨天的故事这一张旧船票 能否登上你的客船留连的钟声 还在敲打我的无眠尘封的日子 始终不会是一片云烟久违的你 一定保存着那张笑脸许多年以后 能不能接受彼此的改变月落乌啼总是千年的风霜涛声依旧不见当初的夜晚今天的你我 怎样重复昨天的故事这一张旧船票 能否登上你的客船月落乌啼总是千年的风霜涛声依旧不见当初的夜晚今天的你我 怎样重复昨天的故事这一张旧船票 能否登上你的客船
老歌,经典,一定时代的记忆,队长好分享 {:4_187:} 大猫咪 发表于 2022-2-21 20:46
老歌,经典,一定时代的记忆,队长好分享
猫猫跑得真快。{:4_189:}{:4_204:}{:4_190:} 队长现在玩这个单曲播放器很溜了,确实哦加分后就出来2个声音了 小辣椒 发表于 2022-2-21 21:34
队长现在玩这个单曲播放器很溜了,确实哦加分后就出来2个声音了
我这里只有一个声音的。 经典老歌,好听。 红影 发表于 2022-2-22 09:26
经典老歌,好听。
红影上午好!{:4_187:}
页:
[1]