花花的世界
本帖最后由 醉美水芙蓉 于 2023-2-5 13:32 编辑 <br /><br /><style>#papa { left: calc(50% - 81px); transform: translateX(-50%); width: 1200px; height: 802px; background: tan url('https://img-baofun.zhhainiao.com/pcwallpaper_ugc/live/10b87bcabe324444c919f7603a9e06ac.mp4.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; top:100px; display: grid; place-items: center; overflow: hidden; user-select: none; z-index: 1; }
.ship { position: absolute; width: 1200px; height: 802px; object-fit: cover; opacity: .55; clip-path: circle(90% at bottom) ;mix-blend-mode: screen;}
#dt1{ position: absolute; width: 459px; height: 241px; top: 382px; left: 810px; }
#dt2{ position: absolute; width: 120px; height: 71px; top: 550px; left: 450px; }
@keyframes rot1 { to { transform: rotate(5deg); } }
@keyframes rot2 { from { transform: rotate(-15deg) scale(1); } to { transform: rotate(15deg) scale(1.5); } }
@keyframes opa { from { opacity: 0; } to { opacity: .55; } }
</style>
<div id="papa">
<video class="ship"
src="https://img.tukuppt.com/video_show/2629112/00/01/92/5b4d9113bffd1.mp4" autoplay="autoplay" loop="loop" muted="muted"></video>
<audio id="aud" src="https://www.qqmc.com/up/kwlink.php?id=256510314&.mp3" loop autoplay></audio>
<script >
(function() {
(function(mkPlayer) {let defaults = {lrcAr: [,],ttAr: ['花潮','论坛','LRC','在线'],lrc_css: 'top: 20px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: calc(50% - 50px);', playerCode: `<style>#mplayer {--bg: linear-gradient(to right bottom,olive,black);position: absolute;width: 100px;height: 100px;display: grid;place-items: center;animation: rot 10s infinite linear;cursor: pointer;color: snow;transform-style: preserve-3d;}.pedal {position: absolute;width: 120px;height: 50px;background: var(--bg);font: bold 2em sans-serif;display: grid;place-items: center;opacity: .95;}.pedal:nth-of-type(1) { transform: rotateY(45deg) translateZ(50px); }.pedal:nth-of-type(2) { transform: rotateY(135deg) translateZ(50px); }.pedal:nth-of-type(3) { transform: rotateY(-135deg) translateZ(50px); }.pedal:nth-of-type(4) { transform: rotateY(-45deg) translateZ(50px); }#btnMsg { position: absolute;top:20px; left: calc(50% - 396px);color: snow; background: #666; opacity: 0; border: 2px solid snow; border-radius: 8px; padding: 4px; transition: all .75s; cursor: pointer; z-index: 901; }#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 rot { to { transform: rotateY(-1turn); } }@keyframes cover1 { from { width: 0; }to { width: 100%; } }@keyframes cover2 { from { width: 0; } to { width: 100%; } }</style><div id="lrc" data-lrc="HCPlayer">HCPlayer</div><div id="mplayer"><span class="pedal"></span><span class="pedal"></span><span class="pedal"></span><span class="pedal"></span></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, tnow = Date.now(), timerId;;data.ttAr.forEach( (item,key) => {let spans = mplayer.children;spans.innerText =item;});mplayer.onclick = () => 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"', 3000);};document.addEventListener("fullscreenchange", () => {if (document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());let mState = () => aud.paused ? (lrc.style.setProperty('--state','paused'), mplayer.style.animationPlayState='paused') : (lrc.style.setProperty('--state','running'), mplayer.style.animationPlayState='running');aud.addEventListener('timeupdate', () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {if (mKey === j) showLrc(data.lrcAr);else continue;}}});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,
lrc_css: '--bg: linear-gradient(hsla(180,80%,60%,.7),hsla(220,70%,40%,.5));left:100px; top: 670px;',
ttAr: ['你若','安好','便是','晴天'],
player_css: '--bg: repeating-linear-gradient(90deg, transparent,RED 8px, silver 16px); top: 5px; left:1000px;color: lightblue;',
});
})();
</script>
醉美水芙蓉 发表于 2023-2-2 21:50
现在可以了吗?
现在还是不行啊 水芙蓉贴子好漂亮!美女好象要动起来{:4_187:} 播放器改了颜色和高度{:4_204:}厉害 芙蓉这个贴子做得漂亮{:4_199:}评分被挡了啊 这个帖子里的人物好美啊。不过评不了分。还有全屏文字最好别在美女脸上,影响欣赏那么漂亮的美人儿呢{:4_187:} 雨中悄然 发表于 2023-2-2 21:20
播放器改了颜色和高度厉害
高度和颜色可以随便改! 绿叶清舟 发表于 2023-2-2 21:21
芙蓉这个贴子做得漂亮评分被挡了啊
现在可以了吗? 红影 发表于 2023-2-2 21:36
这个帖子里的人物好美啊。不过评不了分。还有全屏文字最好别在美女脸上,影响欣赏那么漂亮的美人儿呢{:4_18 ...
红影美女说的对!我还不知道哪儿改呢? 醉美水芙蓉 发表于 2023-2-2 21:50
红影美女说的对!我还不知道哪儿改呢?
比方说,要将播放器放在右上角:
你原来的代码是:
player_css: '--bg: repeating-linear-gradient(90deg, transparent,RED 8px, silver 16px); top: 5px; left:1000px;color: lightblue;',
红色部分就是位置设置,其中,left 表示左边值,你可以改用右边值 right 代替它:right: 20px; ,这样,全屏后它依然在里右边边缘 20px 的位置上;top 是上边值,如果需要放在帖子的下边,则用 bottom 代替它,表示离帖子下边线的距离。
lrc歌词的位置也是一样道理。
醉美水芙蓉 发表于 2023-2-2 21:50
红影美女说的对!我还不知道哪儿改呢?
看10楼,黑黑解说了{:4_187:} 绿叶清舟 发表于 2023-2-2 21:53
现在还是不行啊
谢谢清舟回复! 马黑黑 发表于 2023-2-2 22:16
比方说,要将播放器放在右上角:
你原来的代码是:
谢谢黑黑老师无私奉献! 醉美水芙蓉 发表于 2023-2-2 23:08
谢谢黑黑老师无私奉献!
{:4_190:} 我看很精彩 ,真的是一种艺术了 欣赏老师佳作! 很漂亮,欣赏老师的精美分享!{:4_176:} 醉美水芙蓉 发表于 2023-2-2 23:07
谢谢清舟回复!
芙蓉客气了 马黑黑 发表于 2023-2-2 22:16
比方说,要将播放器放在右上角:
你原来的代码是:
黑黑老师没有找到全屏观赏四个字位置如何移动? 醉美水芙蓉 发表于 2023-2-4 21:53
黑黑老师没有找到全屏观赏四个字位置如何移动?
有一些插件做有,有一些没有
页:
[1]