太湖春-古筝演奏
本帖最后由 宁静 于 2023-2-22 13:53 编辑 <br /><br /><style>#papa { margin: 120px 0 0 calc(50% - 513px); display: grid; place-items: center; width: 1024px; height: 640px; background: gray url('https://pan.365.tf/uploads/lxx/20230222/thc.gif') no-repeat center/cover; box-shadow: 3px 3px 20px #000; overflow: hidden; user-select: none; position: relative; z-index: 1; }
</style>
<div id="papa"></div>
<audio id="aud" src="https://pan.365.tf/uploads/lxx/20230222/thc.mp3" loop autoplay></audio>
<script >
(function() {
(function(mkPlayer) {let defaults = { player_css: 'bottom: 20px; left: calc(50% - var(--ww) / 2);', playerCode: `<style>#mplayer {position: absolute;display: flex;align-items: center;gap: 6px;opacity: 0;transition: opacity .75s;--ww: 40px;--state: paused;--bg: black;--border: snow;}#btnplay {background: conic-gradient(red,orange,yellow,green,teal,blue,purple);mask: radial-gradient(transparent 3px,red 0);-webkit-mask: radial-gradient(transparent 3px,red 0);border-radius: 50%;width: var(--ww);height: var(--ww);cursor: pointer;animation: rot linear 3s infinite;animation-play-state: var(--state);}#btnMsg { color: var(--border); background: var(--bg); border: 2px solid var(--border); border-radius: 8px; font: normal 15px sans-serif; padding: 3px; cursor: pointer; }@keyframes rot { to { transform: rotate(1turn); } }</style><div id="mplayer"><span id="btnplay"></span><span id="btnMsg">全屏观赏</span></div>`,};let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);let timerId, fs = false;papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => aud.play());let mState = () => btnplay.style.setProperty('--state', aud.paused ? 'paused' : 'running');btnMsg.onclick = () => fs ? document.exitFullscreen() : papa.requestFullscreen();papa.onmousemove = (e) => {clearTimeout(timerId);mplayer.style.opacity = '.95';timerId = setTimeout('mplayer.style.opacity = "0"', 3000);};document.addEventListener("fullscreenchange", () => {if (document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});};mkPlayer.HCPlayer = playCode;})(this);
HCPlayer({
player_css: 'left: 850px; bottom: 20px; --ww: 45px; --bg: green; border: --snow;',
});
})();
</script>
<br><br><br> 本帖最后由 宁静 于 2023-1-29 13:48 编辑
电脑欣赏鼠标滑过界面右下方,播放器和[全屏观赏]字样出来,点击欣赏全屏效果
刚才手机试了一下,全屏手机操作后,播放器会太下面,点击不到。手机欣赏还是算了,电脑看看效果好。 刚好今天是电脑 试了全屏{:9022:} 欣赏古筝音乐 画面清新,纯天然的绿{:9001:} 最后一个来这里碰运气{:9001:} 漂亮{:10_402:} 沉默 发表于 2023-1-29 14:39
最后一个来这里碰运气
运气好不好都无所谓,参与了自己快乐就好
页:
[1]
2