重新制作妹妹想哥泪花儿掉
<style>#papa { left: -214px; width: 1024px; height: 640px; background: gray url('https://s1.ax1x.com/2022/10/19/xyF0WF.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display: grid; place-items: center; overflow: hidden; user-select: none; position: relative; z-index: 1; }
.btnplay { position: absolute; top: 0px; left: 100px; width: 80px; height: 80px; border-radius: 50%; box-shadow: 15px 10px 0 0 orange; cursor: pointer; z-index: 10; animation: swing 1s linear infinite alternate; }
.btnplay::before { position: absolute; content: ''; left: 20px; top: 12px; width: 100%; height: 100%; }
.btnplay::after { position: absolute; content: ''; left: 25px; top: 25px; width: 40%; height: 40%; border-radius: 50%; background: tan; box-shadow: 0 0 30px 0px purple, 0 0 100px 0 snow; }
#lrc { --motion: cover1; --tt: 1s; --state: paused; position: absolute; bottom: 15px; font: bold 2.4em sans-serif; color: hsl(60,100%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 2px hsla(0,100%,0%,.85)); }
#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%,.75),hsla(60,100%,50%,.65)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
#svg { position: absolute; font: bold 6em sans-serif; }
.text { fill: none; stroke-width: 3; stroke-dasharray: 0 300; stroke-dashoffset: 0; }
.text:nth-child(3n + 1) { stroke: orange; animation: stroke1 30s ease-in-out infinite alternate; }
.text:nth-child(3n + 2) { stroke: red; animation: stroke2 30s ease-in-out infinite alternate; }
.text:nth-child(3n + 3) { stroke: snow; animation: stroke3 30s ease-in-out infinite alternate; }
.text:hover { fill: teal; opacity: .45; }
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes swing { from { transform: rotate(0deg); } to { transform: rotate(30deg); } }
@keyframes stroke1 { to { stroke-dashoffset: 1000; stroke-dasharray: 80 160; } }
@keyframes stroke2 { to { stroke-dashoffset: 1080; stroke-dasharray: 80 160; } }
@keyframes stroke3 { to { stroke-dashoffset: 1160; stroke-dasharray: 80 160; } }
</style>
<div id="papa">
<svg id="svg" width="1024" height="640">
<symbol id="s-text"><text text-anchor="middle" x="50%" y="25%" dy=".35em";>妹妹想哥泪花儿掉</text></symbol>
<use xlink:href="#s-text" class="text"></use>
<use xlink:href="#s-text" class="text"></use>
<use xlink:href="#s-text" class="text"></use>
</svg>
<span class="btnplay" title="播放/暂停"></span>
<span style="position: absolute; transform: rotate(270deg); bottom: -120px; left: 80px; ">
<span class="btnplay" style="filter:blur(3px); opacity: .45; cursor: default;"></span>
</span>
<span id="lrc" data-lrc="花潮论坛lrc在线">花潮论坛lrc在线</span>
</div>
<script>
(function() {
let mKey = 0, mFlag = true, aud = new Audio();
let lrcAr =[
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
let btnplay = document.querySelector('.btnplay');
aud.src = ' https://www.qqmc.com/up/kwlink.php?id=244827513';
aud.loop = false;
aud.play();
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
aud.addEventListener('ended', () => { mKey = 0; aud.play(); });
aud.addEventListener('timeupdate', () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime >= lrcAr) {if (mKey === j) showLrc(lrcAr);else continue;}}});
let mState = () => aud.paused ? (btnplay.style.animationPlayState = 'paused', lrc.style.setProperty('--state', 'paused')) : (btnplay.style.animationPlayState = 'running', lrc.style.setProperty('--state', 'running'));
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;};
})();
</script>
制作漂亮,播放器的倒影也挺不错。欣赏水芙蓉好帖{:4_187:} 红影 发表于 2022-10-20 08:37
制作漂亮,播放器的倒影也挺不错。欣赏水芙蓉好帖
谢谢红影美女光临支持! 有创意!赞!{:4_199:} 醉美水芙蓉 发表于 2022-10-20 11:42
谢谢红影美女光临支持!
客气了,问好水芙蓉美女{:4_204:} 加林森 发表于 2022-10-20 11:55
有创意!赞!
谢谢队长支持鼓励! 醉美水芙蓉 发表于 2022-10-20 17:51
谢谢队长支持鼓励!
应该的。 选景很用心呢,棒棒的 马黑黑 发表于 2022-10-20 23:48
选景很用心呢,棒棒的
谢谢黑黑老师光临指导! 醉美水芙蓉 发表于 2022-10-21 06:55
谢谢黑黑老师光临指导!
{:5_108:}
页:
[1]