被情伤过的女人 - 孙露
<style>#papa { margin: 20px 0 20px calc(50% - 681px); background:url('https://pic.imgdb.cn/item/660907429f345e8d03e17977.jpg') no-repeat center/cover;width: 1200px; height: 700px; box-shadow: 3px 3px 6px gray; overflow: hidden; z-index: 1; position: relative; display: grid; place-items: center; }
#tx {position: absolute;
width: 100%;
height: 100%;
bottom: 0px;
background:inherit;
filter: url(#turb);
}
#papa::before{ position: absolute;top:0%; left:0%; content: ''; width: 100%; height: 100%; background:url('https://pic.imgdb.cn/item/663f05bb0ea9cb14039b2934.jpg')no-repeat center/cover; z-index: 2;opacity: 0.3; }
#papa:hover::before { position: absolute;top:0%; left:0%; width: 100%; height: 100%; content: '';opacity: 0.7;transition: 1s;}
#mplayer {z-index: 80;
position: absolute;
left: calc(5% - 15px);
bottom: 5px;
width: 50px;
height: 50px;
opacity: 1;
transition: .2s;
place-items: center;
--disp1: 0; --disp2: 1;
}
#mplayer::before , #mplayer::after{
position: absolute;
content: '';
cursor: pointer;
transition: .2s;
}
#mplayer::before {
width: 50px;
height: 50px;opacity: 1;
background: url("https://www.kumeiwp.com/sub/filestores/2022/12/05/2df9122733b83c702ccd579c693a2271.png") no-repeat center/cover;
opacity: var(--disp1);
}
#mplayer::after {
width: 50px;
height: 50px;opacity: 1;
background: url("https://www.kumeiwp.com/sub/filestores/2022/12/05/79de7156c08a00eb480d7f1a00b5ba74.png")no-repeat center/cover;
opacity: var(--disp2);
}
#tmsg {position: absolute;z-index: 91;
font: normal 15px sans-serif;
color: #ffffff;
top:94%;
left:90%;}
#prog {position: absolute;z-index: 91;
width: 76%;
height: 2%;
cursor: pointer;
top:95%;
box-shadow: 0px 0px 0.1px 0.1px #000000;
left:10%;
border-radius: 3px;}
</style>
<div id="papa">
<svgid="tx">
<filter id="turb" filterUnits="objectBoundingBox" x="0" y="0" width="100%" height="100%">
<feTurbulence id="feturbulence" type="fractalNoise" numOctaves="3" seed="2"></feTurbulence>
<feDisplacementMap xChannelSelector="G" yChannelSelector="B" scale="20" in="SourceGraphic"></feDisplacementMap>
</filter>
</svg>
<div id="tmsg">00:00 | 00:00</div><divid="prog"></div>
<div id="mplayer"></div>
<div data-lrc="亚伦影音工作室" id="lrc">亚伦影音工作室</div>
</div>
<audio id="aud" src="https://s2.ananas.chaoxing.com/sv-w8/audio/d2/e8/d6/7e7f7f93e193625ce886431276736290/audio.mp3" loop autoplay></audio>
<script>
let frames = 0, rad = Math.PI / 180;
let js = 'https://638183.freep.cn/638183/web/lizi/h5lz_2d.js';
let loadJs = (url,callback) => {
let body = document.querySelector('body'), jsNode = document.createElement('script');
jsNode.charset = 'utf-8';
jsNode.setAttribute('src', url);
body.appendChild(jsNode);
jsNode.onload = () => callback();
};
loadJs(js, () => {
H5lz({
papa: '#tx',
total: 60,
size: {width: 4, height: 4},
shape: {background: '#eee', borderRadius: ''},
ani: 'toBottom',
maxTime: 30,
offset: {x: -80, y: 0},
});
});
let fewave = () => {
let bfx = 0.01, bfy = 0.1;
frames += 0.1;
bfx += 0.002 * Math.cos(frames * rad);
bfy += 0.02 * Math.sin(frames * rad);
bf = ;
feturbulence.setAttributeNS(null, 'baseFrequency',bf.join(' '));
requestAnimationFrame(fewave);
};
fewave();
</script>
<style type="text/css">
#lrc {
--state: paused;
--motion: cover2;
--tt: 2s;
--bg: linear-gradient(180deg, #880000, #880000);
position: absolute;z-index: 4;
left: 50%;
transform: translate(-50%);
top: 84%;
font:normal 3em 华文隶书;
color: #000078;
white-space: pre;
-webkit-background-clip: text;
filter:drop-shadow(#FFFFFF 1px 0 0)drop-shadow(#FFFFFF 0 1px 0)drop-shadow(#FFFFFF -1px 0 0) drop-shadow(#FFFFFF 0 -1px0);
}
#lrc::before {
position: absolute;
content: attr(data-lrc);
width: 20%;
height: 100%;
color: transparent;
overflow: hidden;
white-space: pre;
background: var(--bg);
-webkit-background-clip: text;
animation: var(--motion) var(--tt) linear forwards;
animation-play-state: var(--state);
}
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
</style>
<script >
(function() {
/*原始lrc歌词*/
let lrcStr = `被情伤过的女人 - 孙露
作词:吕万山
作曲:赵立兴
专辑:被情伤过的女人
演唱:孙露
☆★Lrc编辑 亚伦★☆
☆★协编 亚伦★☆
● ● ● ● ● ● ●
午夜里孤独的女人
用烟薰着曾经的伤痕
忘不掉那个负心的人
莫非你从来就没悔恨
你身上冷冷的纹身
是为谁雕刻了那么深
你那双忧郁的眼神
再也回不去那么诚恳
被情伤过的女人
再不会轻易打开爱的门
过去那些不属于
自己的缘分
在你眼角 添了皱纹
哦 被情伤过的女人
已经看破了世间的红尘
曾经走过那些
不完美的人生
已风干 你的泪痕
(Music)
☆★亚伦影音工作室谢谢欣赏★☆
=亚伦影音=
`;
/*变量 :mKey - 当前歌词索引;mFlag :调用关键帧动画索引;averAdd :平均值补偿*/
let mKey = 0, mFlag = true, averAdd = 0.3;
/*函数 :获取每句歌词用时,歌词用时若超过平均值则取平均值,最后一句歌词则取平均值*/
let lrcTime = (ar) => {
let tmpAr = [];
for(j = 0; j <ar.length - 1; j ++) {
if(j !== ar.length - 1) tmpAr = parseFloat((ar - ar).toFixed(1));
}
let aver = parseInt(tmpAr.reduce((a,b) => a + b) / (tmpAr.length - 1)) + averAdd;
tmpAr.push(aver);
tmpAr.forEach((item,key) => {
ar = item > aver ? aver : item;
});
return ar;
};
/*函数 :从原始lrc歌词获取信息并存入 n*3 数组*/
let getLrcAr = (text) => {
let lrcAr = [];
let calcRule = ;
for(x of text.split('\n')) {
let ar = [];
let re = /\d+[\.:]\d+([\.:]\d+)?/g;
let geci = x.replace(re,'');
if(geci) {
geci = geci.replace(/[\[\]\'\"\t,]s?/g,'');
let time = x.match(re);
if(time != null) {
for(y of time) {
let tmp = y.match(/\d+/g);
let sec = 0;
for(z in tmp) sec += tmp * calcRule;
ar = ;
lrcAr.push(ar);
}
}
}
}
lrcAr.sort((a,b)=> a - b);
return(lrcTime(lrcAr));
};
/*函数 :模拟显示同步歌词*/
let showLrc = (time) => {
let name = mFlag ? 'cover1' : 'cover2';
lrc.innerHTML = lrcAr;
lrc.dataset.lrc = lrcAr;
lrc.style.setProperty('--motion', name);
lrc.style.setProperty('--tt', time + 's');
lrc.style.setProperty('--state', 'running');
mKey += 1;
mFlag = !mFlag;
};
/*函数 :处理当前歌词索引 mKey*/
let calcKey = () => {
for (j = 0; j < lrcAr.length; j++) {
if (aud.currentTime <= lrcAr) {
mKey = j - 1;
break;
}
}
if (mKey < 0) mKey = 0;
if (mKey > lrcAr.length - 1) mKey = lrcAr.length - 1;
let time = lrcAr - (aud.currentTime - lrcAr);
showLrc(time);
};
/*格式化时间信息*/
let toMin = (val) => {
if (!val) return '00:00';
val = Math.floor(val);
let min = parseInt(val / 60),
sec = parseFloat(val % 60);
if (min < 10) min = '0' + min;
if (sec < 10) sec = '0' + sec;
return min + ':' + sec;
}
/*函数 :关键帧动画状态切换*/
let mState = () => aud.paused ? (lrc.style.setProperty('--state','paused'),mplayer.style.animationPlayState = 'paused') : (lrc.style.setProperty('--state','running'),mplayer.style.animationPlayState = 'running');
/*监听播放进度*/
aud.addEventListener('timeupdate', () => {
for (j = 0; j < lrcAr.length; j++) {
if (aud.currentTime >= lrcAr) {
cKey = j;
if (mKey === j) showLrc(lrcAr);
else continue;
}
}
});
aud.addEventListener('pause', () => mState());/*监听暂停事件*/
aud.addEventListener('play', () => mState());/*监听播放事件*/
aud.addEventListener('seeked', () => calcKey());/*监听查询事件*/
let lrcAr = getLrcAr(lrcStr); /*获得歌词数组*/
})();
(function(){let mState = () => aud.paused ? (mplayer.style.setProperty('--disp1','1'), mplayer.style.setProperty('--disp2','0')) : (mplayer.style.setProperty('--disp1','0'), mplayer.style.setProperty('--disp2','1'));
mplayer.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
})();
</script>
<script>
/*进度条 进度时间*/
prog.onclick = (e) => {
aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
}
aud.addEventListener('timeupdate', () => {
aud.addEventListener('timeupdate', () => {prog.style.background= 'linear-gradient(90deg, #800000, #800000, #800000 '+ aud.currentTime / aud.duration * 100 + '%, #eeeeee 0)';});
tmsg.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
});
let toMin = (val) => {
if (!val) return '00:00';
val = Math.floor(val);
let min = parseInt(val / 60),
sec = parseFloat(val % 60);
if (min < 10) min = '0' + min;
if (sec < 10) sec = '0' + sec;
return min + ':' + sec;
};
/*结束*/
</script>
请求马黑老师将特效动画用音乐按钮控制! 欣赏老师的佳作,点赞!
鼠标移动,可以让人物透明度发生变化呢。
这样的场景和歌曲意境很相配{:4_187:} 欣赏亚伦老师好帖{:4_187:} 我手机欣赏,点击来点击去就没有听到音乐{:4_203:} 这是老樵爱听的歌。。。{:5_106:}
页:
[1]