红影 发表于 2023-8-1 14:02

【贺建军节】《从这里走向战场》

<style>
        #papa { margin: 60px 0 0 calc(50% - 600px); width: 1024px; height: 700px;display: grid; place-items: center; user-select: none; position: relative; z-index: 1; }
        #mplayer { position: absolute; left:70px;bottom: 32px; }
        #btnwrap { display: block; fill: hsla(30, 20%, 80%, .9); cursor: pointer; }
        #btnwrap:hover { fill: hsla(90, 100%, 100%, .9); }
        #tmsg { fill: hsla(30, 100%, 90%, .9); stroke: none; font: bold 1em sans-serif; }
        #lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; bottom: 32px; left: 50%; transform: translate(-50%); font: bold 2.4em sans-serif; color: hsl(240,50%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 2px hsla(30,10%,10%,.95)); }
        #lrc::before { position: absolute; content: attr(data-lrc); width: 20%; height: 100%; color: transparent; overflow: hidden; white-space: nowrap; background: linear-gradient(180deg,hsla(0,100%,50%,.85),hsla(0,100%,50%,.45),hsla(60,100%,60%,.75)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
        #pic { position: absolute; right: 0px; top: 0px; width: 1024px; height: 700px; }
        #pic1 { position: absolute; left: 60px; top: 80px; width: 200px; height: 214px; opacity: 0.7; }
        .vid { position: absolute; right: 10px; bottom: 10px; width: 962px; height: 610px; object-fit: cover; }
        @keyframes cover1 { from { width: 0; } to { width: 100%; } }
        @keyframes cover2 { from { width: 0; } to { width: 100%; } }
       
</style>

<div id="papa">
<video class="vid" src="https://video-js.51miz.com/Video/2017/08/07/18/20170807188802_V106870_adb8a539.mp4" autoplay="autoplay" loop="loop" muted="muted"></video>
<img id="pic" src="https://s1.ax1x.com/2023/07/30/pPpKFkF.png" alt="" />
<img id="pic1" src="https://pic.imgdb.cn/item/64c8a8851ddac507cca9dcea.gif" alt="" />
        <span class="mpic"></span><span class="mpic mp1"></span><span class="mpic mp2"></span>
        <div id="lrc" data-lrc="花潮论坛lrc在线">花潮论坛lrc在线</div>
        <svg id="mplayer" width="120" height="120">
                <g id="mama" transform="rotate(-90, 60, 60)" style="cursor: pointer;">
                        <circle id="track" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke="hsla(0, 20%, 80%, .9)" />
                        <circle id="prog" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke="hsla(0,50%,60%,.75)" />
                </g>
                <g id="btnwrap">
                        <path id="btnplay" d="M 50 50,50 70,70, 60 z"></path>
                        <path id="btnpause" d="M 52 50,52 70,57 70,57 50,52 50 z M 60 50,60 70,65 70,65 50,60 50 z" style="display: none;"></path>
                        <path d="M 57 50,60 50,60 70,57 70 z" fill="transparent" />
                </g>
                <path id="curPath" d="M 20 70 Q 60 0 100 70" fill="none" stroke="none"/>
                <path id="durPath" d="M 20 55 Q 60 110 100 55" fill="none" stroke="none"/>
                <g id="tmsg">
                        <text x="34" y="0"><textPath id="curMsg" xlink:href="#curPath" dominant-baseline="text-after-edge">00:00</textPath></text>
                        <text x="29" y="0"><textPath id="durMsg" xlink:href="#durPath" dominant-baseline="text-before-edge">00:00</textPath></text>
                </g>
        </svg>
</div>
<audio id="aud" src="http://www.kumeiwp.com/sub/filestores/2023/07/20/0a8bdb70974ceb7f19b12e899f1dd006.mp3" loop autoplay></audio>

<script>
(function() {
        let mKey = 0, mSeek = false, mFlag = true;
        let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
        let cc = { x: 1*track.getAttribute('cx'), y: 1*track.getAttribute('cy'), len: track.getTotalLength(),};
        prog.style.strokeDasharray = prog.style.strokeDashoffset =cc.len;
        btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
        mama.onclick = (e) => {let deg = Math.atan2(e.offsetY - cc.y, e.offsetX - cc.x) * 180 / Math.PI;deg += (e.offsetX < cc.x && e.offsetY < cc.y) ? 450 : 90;aud.currentTime = aud.duration * deg / 360;};
        aud.addEventListener('pause', () => mState());
        aud.addEventListener('play', () => mState());
        aud.addEventListener('seeked', () => calcKey());
        aud.addEventListener('timeupdate', () => {prog.style.strokeDashoffset = cc.len - cc.len * aud.currentTime / aud.duration;curMsg.textContent = toMin(aud.currentTime);durMsg.textContent = toMin(aud.duration);for(j=0; j<lrcAr.length; j++) {if(aud.currentTime >= lrcAr) {if(mKey === j) showLrc(lrcAr);else continue;}}});
let vid = document.querySelector('.vid');
        let mState = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none', lrc.style.setProperty('--state', 'paused'),vid.pause()) : (btnplay.style.display = 'none', btnpause.style.display = 'block', lrc.style.setProperty('--state', 'running'), vid.play());
        let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrc.dataset.lrc = lrcAr;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);};
        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>

小辣椒 发表于 2023-8-1 14:46

今天“八一建军节”,一起共同祝福我们最可爱的人{:4_177:}

梦油 发表于 2023-8-1 16:52

借红影美帖祝人民解放军节日快乐!

马黑黑 发表于 2023-8-1 19:46

欣赏

红影 发表于 2023-8-1 22:06

小辣椒 发表于 2023-8-1 14:46
今天“八一建军节”,一起共同祝福我们最可爱的人

跟亲爱的一起祝贺{:4_204:}

红影 发表于 2023-8-1 22:06

梦油 发表于 2023-8-1 16:52
借红影美帖祝人民解放军节日快乐!

跟梦油一起祝贺{:4_187:}

红影 发表于 2023-8-1 22:06

马黑黑 发表于 2023-8-1 19:46
欣赏

黑黑节日快乐{:4_187:}

马黑黑 发表于 2023-8-1 22:07

红影 发表于 2023-8-1 22:06
黑黑节日快乐

大家节日好

红影 发表于 2023-8-1 23:04

马黑黑 发表于 2023-8-1 22:07
大家节日好

节日必须好{:4_173:}

马黑黑 发表于 2023-8-1 23:05

红影 发表于 2023-8-1 23:04
节日必须好

那是

红影 发表于 2023-8-1 23:23

马黑黑 发表于 2023-8-1 23:05
那是

节日要过完了,最后再次祝黑黑节日快乐{:4_187:}

马黑黑 发表于 2023-8-1 23:25

红影 发表于 2023-8-1 23:23
节日要过完了,最后再次祝黑黑节日快乐

再次感谢

红影 发表于 2023-8-2 12:21

马黑黑 发表于 2023-8-1 23:25
再次感谢

你的节日就这么过完了{:4_173:}

马黑黑 发表于 2023-8-2 12:50

红影 发表于 2023-8-2 12:21
你的节日就这么过完了

这个已经不是我的节日了,是曾经的节日

红影 发表于 2023-8-2 14:11

马黑黑 发表于 2023-8-2 12:50
这个已经不是我的节日了,是曾经的节日

毕竟和你关联啊,仍然是你的节日。

马黑黑 发表于 2023-8-2 18:19

红影 发表于 2023-8-2 14:11
毕竟和你关联啊,仍然是你的节日。

不是

红影 发表于 2023-8-2 20:29

马黑黑 发表于 2023-8-2 18:19
不是

还谦虚起来了{:4_173:}

马黑黑 发表于 2023-8-2 20:29

红影 发表于 2023-8-2 20:29
还谦虚起来了

应该的

红影 发表于 2023-8-2 21:23

马黑黑 发表于 2023-8-2 20:29
应该的

其实我上传了三首军歌,本来想做3个帖子的,结果只做了2个{:4_173:}

马黑黑 发表于 2023-8-2 22:53

红影 发表于 2023-8-2 21:23
其实我上传了三首军歌,本来想做3个帖子的,结果只做了2个

留个明年做
页: [1] 2 3 4
查看完整版本: 【贺建军节】《从这里走向战场》