欢乐祥和中国年
本帖最后由 醉美水芙蓉 于 2023-1-19 20:51 编辑 <br /><br /><style>#papa { margin: 0 0 0 calc(50% - 623px); width: 1080px; height: 640px; background: darkgray url('http://pan.yinhuabbs.cn/view.php/43892e8c6d50bf0656f5d55bd18f9c41.png') no-repeat center/cover; box-shadow: 4px 8px 16px #000; display: grid; place-items: center; perspective: 1000px;position: relative; opacity: .95; z-index: 1; }
#tit{position: absolute; left:120px; top: -30px;background-image:url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/tp/bk/bk_7.gif'); background-size:cover; width:800px; height:200px; font: bold 2.5em sans-serif; text-align:center; line-height:200px; color:transparent; -webkit-background-clip:text; border:0px #ff0 solid; }
#papa::before { position: absolute;content: ''; bottom: 60px; width: 420px; height: 140px; background: url('qianqian.gif') no-repeat center/cover; border-radius: 100%; transform-style: preserve-3d; transform: rotateY(180deg) rotateZ(-0deg); pointer-events: none; box-shadow: 2px 4px 4px #222; }
</style>
<div id="papa"></div>
<audio id="aud" src="https://www.qqmc.com/up/kwlink.php?id=258822283&.mp3" autoplay loop></audio>
<script >
(function() {
(function(mkPlayer) {let defaults = {lrcAr: [ ],lrc_css: 'top: 15px; left: 50%; transform: translate(-50%)',player_css: 'bottom: 5px; left: 50%; transform: translate(-50%)',angle: -90,playerCode: `<style>#mplayer {--ww: 300px;--hh:100px;--state: paused;position: absolute;width: var(--ww);height: var(--hh);transform-style: preserve-3d;cursor: pointer;z-index: 899;}#mplayer::before { position: absolute; content: ''; left: -20px; right: -20px; top: 0; bottom: -35px; }.mline {position: absolute;width: 6px;height: 10px;bottom: 0;left: calc(50% - 4px);border-radius: 10px;transition: all .35s;opacity: .95;}.mline::before {position: absolute;content: '';width: 10px;height: 2px;left: calc(50% - 5px);background: var(--psecolor);border-radius: 50%;transition: all var(--ts);animation: up 1s infinite;animation-play-state: var(--state);}#btnMsg {position: absolute;color: snow;background: green;opacity: 0;border: 2px solid snow;border-radius: 8px;padding: 4px;transition: all .75s;cursor: pointer;z-index: 1001;}#lrc {--motion: cover2;--tt: 1s;--state: running;--bg: linear-gradient(180deg,hsla(100,10%,50%,.75),hsla(100,100%,20%,.65));position: absolute;font: bold 2.4em sans-serif;color: hsl(100, 100%, 90%);white-space: pre;-webkit-background-clip: text;filter: drop-shadow(1px 1px 2px hsla(0, 100%, 0%, .85));z-index: 900;}#lrc::before {position: absolute;content: attr(data-lrc);width: 20%;height: 100%;color: transparent;overflow: hidden;white-space: pre;background: var(--bg);filter: inherit;-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%; } }@keyframes up { to { top: -20px; } }</style><div id="lrc" data-lrc="HCPlayer">HCPlayer</div><div id="mplayer"></div><span id="btnMsg">全屏观赏</span>`,};let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;lrc.style.cssText += data.lrc_css;let mKey = 0, mFlag = true, fs = false, timerId;let total = Math.floor(mplayer.offsetWidth / 8), mRad = Math.floor(mplayer.offsetWidth /1.8), tnow = Date.now();mplayer.onclick = (e) => aud.paused ? aud.play() : aud.pause();btnMsg.onclick = () => fs ? document.exitFullscreen() : papa.requestFullscreen();papa.onmousemove = (e) => {clearTimeout(timerId);btnMsg.style.opacity = '.95';timerId = setTimeout('btnMsg.style.opacity = "0"', 6000);};for (j = 0; j < total; j++) {let ele = document.createElement('span');ele.className = 'mline';ele.style.cssText += `background: linear-gradient(to bottom, #${Math.random().toString(16).substr(-6)}, #${Math.random().toString(16).substr(-6)});transform: rotateY(${j*-180/total + data.angle}deg) translateZ(${mRad}px);--psecolor: linear-gradient(135deg, #${Math.random().toString(16).substr(-6)}, #${Math.random().toString(16).substr(-6)});--ts: ${Math.random()}s;`;mplayer.appendChild(ele);}let lines = document.querySelectorAll('.mline');let update = () => {if (Date.now() - tnow > 65) {lines.forEach((item, key) => {let ph = aud.paused ? 0 : mplayer.offsetHeight;item.style.height = Math.random() * ph + 'px';});tnow = Date.now();}requestAnimationFrame(update);};update();aud.addEventListener('timeupdate', () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {if (mKey === j) showLrc(data.lrcAr);else continue;}}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());document.addEventListener("fullscreenchange", () => {if (document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});let mState = () => aud.paused ? (lrc.style.setProperty('--state', 'paused'), mplayer.style.setProperty('--state', 'paused')) : (lrc.style.setProperty('--state', 'running'), mplayer.style.setProperty('--state', 'running'));let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = data.lrcAr;lrc.dataset.lrc = data.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 < data.lrcAr.length; j++) {if (aud.currentTime <= data.lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey > data.lrcAr.length - 1) mKey = data.lrcAr.length - 1;let time = data.lrcAr - (aud.currentTime - data.lrcAr);showLrc(time);};};mkPlayer.HCPlayer = playCode;})(this);
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
HCPlayer({
lrcAr: lrcAr,
player_css: '--ww: 300px; --hh:100px; bottom: 90px;',
lrc_css: '--bg: linear-gradient(180deg,hsla(255,100%,50%,.95),hsla(0,100%,50%,.99)); color: lightblue; top: 580px;',
});
})();
</script>
芙蓉新年快乐{:4_191:} 家家团圆幸福年。水芙蓉这个帖子正好。借水芙蓉好帖同祝大家过年好{:4_187:} 绿叶清舟 发表于 2023-1-19 21:01
芙蓉新年快乐
清舟新年快乐! 红影 发表于 2023-1-19 21:10
家家团圆幸福年。水芙蓉这个帖子正好。借水芙蓉好帖同祝大家过年好
红影新年快乐! 醉美水芙蓉 发表于 2023-1-19 21:15
红影新年快乐!
谢谢,也祝水芙蓉阖家团圆,幸福美满{:4_187:} 好创意,好帖子。新年快乐 马黑黑 发表于 2023-1-19 21:27
好创意,好帖子。新年快乐
黑黑老师新年快乐!感谢老师的播放器! 醉美水芙蓉 发表于 2023-1-19 21:29
黑黑老师新年快乐!感谢老师的播放器!
你运用的好 最美芙蓉这贴太好啦,同祝你春节快乐! 樵歌 发表于 2023-1-20 07:54
最美芙蓉这贴太好啦,同祝你春节快乐!
樵歌新年快乐! 醉美水芙蓉 发表于 2023-1-20 09:24
樵歌新年快乐!
提前过年,提前快乐!{:4_204:} 芙蓉的学习帖做得真好,必须点赞{:4_199:}{:4_187:} 千羽 发表于 2023-1-20 20:40
芙蓉的学习帖做得真好,必须点赞
谢谢千羽欣赏支持! 有视频么?我一直没看到 马黑黑 发表于 2023-1-21 20:20
有视频么?我一直没看到
是风中飞尘老师制作的精彩视频! 喜庆美贴,年味十足,楼主新年快乐! 芙蓉新年快樂!吉祥如意!{:4_187:} 雨中悄然 发表于 2023-1-21 22:03
喜庆美贴,年味十足,楼主新年快乐!
谢谢老师鼓励!新年快乐! 小九 发表于 2023-1-21 22:09
芙蓉新年快樂!吉祥如意!
小九美女新年快乐!
页:
[1]