绿叶清舟 发表于 2023-3-19 17:13

午夜醉


<style>
#papa { margin: -80px 0 0 calc(50% - 633px); width: 1100px; height: 700px; background: tan url('https://pic.imgdb.cn/item/6411d03bebf10e5d53d0c803.jpg') center/cover no-repeat; box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; z-index: 1; }
#papa::before { position: absolute; content: ''; right: 60px; top: 20px; width: 60px; height: 60px; border-radius: 50%; background: transparent; box-shadow: 10px 15px 0 #3c3a36; }
#vid { display: none; }
#canv { position: absolute; bottom: 220px; left: 798px;display: block;mix-blend-mode: multiply; mix-blend-mode: saturation;cursor: pointer; }

@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
</style>

<div id="papa">
      <video id="vid" src="http://www.kumeiwp.com/sub/filestores/2023/03/09/87ce9eee4cc0a68ad5b76996c409993f.mp4" autoplay loop></video>
      <canvas id="canv" width="100" height="96"></canvas>
      
      <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1366518204" autoplay loop></audio>
</div>

<script>
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;};
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 mKey = 0, mFlag = true, averAdd = 0, offset = 0, cav = canv.getContext('2d');
let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrcAr;lrc.dataset.lrc = lrcAr.replace(/<br>/, '\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};
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);};
aud.addEventListener('timeupdate', () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime >= lrcAr) {cKey = j;if (mKey === j) showLrc(lrcAr);else continue;}}});
let loop = () => {cav.drawImage(vid, 0, 0, 100, 80);if(!vid.paused) {requestAnimationFrame(loop);return;}}
let mState = () => aud.paused ? (vid.pause(), lrc.style.setProperty('--state', 'paused')) : (vid.play(), lrc.style.setProperty('--state', 'running'));
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
aud.addEventListener('seeked', () => calcKey());
vid.addEventListener('play', loop, false);
canv.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());


</script>

马黑黑 发表于 2023-3-19 17:17

还好,头不疼{:5_106:}

雨中悄然 发表于 2023-3-19 17:20

颜色漂亮,字体设计极美{:4_187:}

梦油 发表于 2023-3-19 17:33

清舟朋友的设计独辟蹊径。

亚伦影音工作室 发表于 2023-3-19 18:27

大气!

冬天的雨 发表于 2023-3-19 19:15

美女,图图看见的,音乐没有听到

冬天的雨 发表于 2023-3-19 19:29

估计清舟又没有加S

红影 发表于 2023-3-19 19:50

清舟把那小醉鬼放到酒杯里去了,有趣。颜色和酒那么接近,一开始都没注意到{:4_173:}

红影 发表于 2023-3-19 19:51

这个设想好,醉鬼就应该在酒杯里{:4_173:}。字体非常漂亮。很赞{:4_187:}

樵歌 发表于 2023-3-19 20:02

菇凉,这个是危险动作{:4_189:}颈椎病不是这个治法

大猫咪 发表于 2023-3-20 20:37

猫也来醉{:5_117:}清舟制作真漂亮,歌美图靓    好听,好看!

{:4_204:}{:4_199:}{:4_191:}{:4_176:}

绿叶清舟 发表于 2023-3-25 19:38

大猫咪 发表于 2023-3-20 20:37
猫也来醉清舟制作真漂亮,歌美图靓    好听,好看!

小心别踩着人家啊{:4_189:}

绿叶清舟 发表于 2023-3-25 19:38

樵歌 发表于 2023-3-19 20:02
菇凉,这个是危险动作颈椎病不是这个治法

可以治醉啊{:4_189:}

绿叶清舟 发表于 2023-3-25 19:39

红影 发表于 2023-3-19 19:50
清舟把那小醉鬼放到酒杯里去了,有趣。颜色和酒那么接近,一开始都没注意到

图片有底色的难去掉啊,只能这样了

绿叶清舟 发表于 2023-3-25 19:39

冬天的雨 发表于 2023-3-19 19:29
估计清舟又没有加S

这个有加的啊

绿叶清舟 发表于 2023-3-25 19:39

马黑黑 发表于 2023-3-19 17:17
还好,头不疼

你咋知道的啊

绿叶清舟 发表于 2023-3-25 19:40

雨中悄然 发表于 2023-3-19 17:20
颜色漂亮,字体设计极美

字体是人家的{:4_189:}

绿叶清舟 发表于 2023-3-25 19:40

亚伦影音工作室 发表于 2023-3-19 18:27
大气!

谢谢亚伦

马黑黑 发表于 2023-3-25 19:53

绿叶清舟 发表于 2023-3-25 19:39
你咋知道的啊

如果头疼,脸上的表情会表现出来

绿叶清舟 发表于 2023-3-25 20:07

马黑黑 发表于 2023-3-25 19:53
如果头疼,脸上的表情会表现出来

看得 这么仔细
页: [1] 2 3
查看完整版本: 午夜醉