小辣椒 发表于 2023-7-4 12:06

热烈祝贺梦油担任油坊版主

<div style="width: 1024px;height: 556px;box-shadow:0px 0px 1px 2px #045768, 0px 0px 0px 8px #99e5f5,0px 0px 5px 15px #045768;overflow:hidden;border-radius:1%;margin-top:150px;margin-LEFT: -210px;">

<style>
#papa {
      margin: auto;
      top: -100px;
      left: 0px;
        width: 1024px;
        height: 576px;
        background: url(' https://xlaj.cn/assets/file/zp/20230704113927.jpg') center/cover no-repeat;
        box-shadow: 3px 3px 20px #000;
        position: relative;
        opacity: 1;
        z-index: 1;
}
#papa:hover
#mplayer { transition: .7s; opacity: .9; }
#vid {
      display: none;
      top: -100px;
      left: 0px;
        width: 1024px;
        height: 576px;
}
#canv {
        position: absolute;
        display: block;
        opacity: 1;
        animation: opa 20s infinite alternate linear;
}
#mplayer {
        position: absolute;
        left: calc(50% - 15px);
        bottom: 15px;
        width: 30px;
        height: 30px;
        border: 2px solid white;
        border-radius: 50%;
        opacity: 0;
        transition: .7s;
        display: grid;
        place-items: center;
        --disp1: 0; --disp2: 1;
}
#mplayer::before,
#mplayer::after {
        position: absolute;
        content: '';
        border-style: solid;
        border-color: white;
        cursor: pointer;
        transition: .4s;
}
#mplayer::before {
        width: 0;
        height: 0;
        left: 10px;
        border-width: 10px 12px;
        border-color: transparent transparent transparent white;
        opacity: var(--disp1);
}
#mplayer::after {
        width: 2px;
        height: 20px;
        border-width: 0 4px 0 4px;
        opacity: var(--disp2);
}
@keyframes opa { to {opacity: 0;} }
</style>
<style type="text/css">

@keyframes mv { from { background-position: 1200px 0; } to { background-position: 0 0; } }

body { overflow-x: hidden; }
#baiBox {
      margin: auto;
      width: 800px;
      text-align: center;
      font-family:微软简中圆;
      font-size: 2.5rem;
      font-weight: bold;
      color: #f46ff6;
      transform-origin: top;
      animation: yao 1.0s linear infinite alternate;
}

@keyframes yao {
      from{transform: perspective(800px) rotatex(30deg); }
      to { transform: perspective(800px) rotatex(-30deg); }
}

.tit { position: relative;width: 300px;height: 30px;top:20px;LEFT: -200px;z-index: 100;filter: drop-shadow(-1px 1px 1px #ffffff)drop-shadow(0px -1px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff) }
#tit:hover { color: green; }
</style>

<div id="hu" >
<div id="baiBox"
<div class="tit">
<span style="color:#076012;"><span style="font-size:45px;"> 热烈祝贺梦油荣升</span>
<span style="color:#3d46f7;"><span style="font-size:20px;"> </span></div>

<div style="position: relative;width: 500px;height: 50px;top:120px;LEFT: 200px;z-index: 100;filter: drop-shadow(-1px 1px 1px #ffffff)drop-shadow(0px -1px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff)drop-shadow(0px 0px 1px ffffff)drop-shadow(0px 0px 1px #ffffff)">
<p><span style="color:#ffffff;"><span style="font-family:华文隶书;"></span></span></p></div>




</div>

</style>

<div id="papa">
        <canvas id="canv"></canvas>
        <div id="mplayer"></div>
<div id="fg"></div>

<div data-lrc="笑纳 - 花僮" id="lrc">笑纳 - 花僮</div>
</div>
</div>

<audio id="aud" src="https://xlaj.cn/assets/file/zp/20230704031443.mp3" loop autoplay></audio>
<video id="vid"src="https://lkvv-1254134120.cos.ap-guangzhou.myqcloud.com/lkvv09/aspyy3/Big%20Boys%20Don't%20Cry.mp4" autoplay muted loop="" controls="" style="MARGIN-TOP:0px;MARGIN-LEFT:0px;background:#000 ;width:1024px; height: 576px;-webkit-mask-image: radial-gradient(black 100%, transparent 100%);position:absolute;left:0px;top:0px;"></video>
<style type="text/css">
#lrc {
        --state: paused;
        --motion: cover2;
        --tt: 2s;
        --bg: linear-gradient(180deg, #045768, #fc4302, #feef03);
        position: absolute;z-index: 4;
        left: 50%;
        transform: translate(-50%);
        top: 80%;
        font:normal 2.4em 隶书;
        color: #055306;
        white-space: pre;
        -webkit-background-clip: text;
        filter:drop-shadow(#FFFFFF 1px 0 0)drop-shadow(#FFFFFF 0 1px 0)drop-shadow(#FFFFFF -1px 0 0) drop-shadow(#FFFFFF 0 -1px0);
}
#lrc::before {
        position: absolute;
        content: attr(data-lrc);
        width: 20%;
        height: 100%;
        color: transparent;
        overflow: hidden;
        white-space: pre;
        background: var(--bg);
       
        -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%; } }
</style>
<script >
(function() {
/*原始lrc歌词*/
let lrcStr = `
笑纳 - 花僮
帖赠梦油 贺荣升
帖赠梦油 贺荣升
撑伞接落花
看那西风骑瘦马
谁能为我一眼望穿流霞
公子是你吗
前面深山谁人家
暮夜抚一曲琵琶
我欲提笔为汝一幅画
佳人请笑纳
挑灯看遍长街的繁华
白胡子老者 临摹入画
一番寒暄 附和月色无暇
忽然清风 惹一池落花
三两知己结伴的仲夏
夜市闹三更 不想回家
星光洒落 老树的枝丫
马蹄浅浅 落一身风沙
撑伞接落花
看那西风骑瘦马
谁能为我一眼望穿流霞
公子是你吗
前面深山谁人家
暮夜抚一曲琵琶
我欲提笔为汝一幅画
佳人请笑纳
撑伞接落花
看那西风骑瘦马
谁能为我熬一缕青发
那人是你吗
谁在窃语谱情话
红尘故事在牵挂
夜风微凉烛影暖心啊
我悠歌把月光请笑纳
挑灯看遍长街的繁华
白胡子老者 临摹入画
一番寒暄 附和月色无暇
忽然清风 惹一池落花
三两知己结伴的仲夏
夜市闹三更 不想回家
星光洒落 老树的枝丫
马蹄浅浅 落一身风沙
撑伞接落花 看那西风骑瘦马
谁能为我一眼望穿流霞
公子是你吗
前面深山谁人家
暮夜抚一曲琵琶
我欲提笔为汝一幅画
佳人请笑纳
撑伞接落花
看那西风骑瘦马
谁能为我熬一缕青发
那人是你吗
谁在窃语谱情话
红尘故事在牵挂
夜风微凉烛影暖心啊
我悠歌把月光请笑纳
`;

/*变量 :mKey - 当前歌词索引;mFlag :调用关键帧动画索引;averAdd :平均值补偿*/
let mKey = 0, mFlag = true, averAdd = 0.3;

/*函数 :获取每句歌词用时,歌词用时若超过平均值则取平均值,最后一句歌词则取平均值*/
let lrcTime = (ar) => {
        let tmpAr = [];
        for(j = 0; j <ar.length - 1; j ++) {
                if(j !== ar.length - 1) tmpAr = parseFloat((ar - ar).toFixed(1));
        }
        let aver = parseInt(tmpAr.reduce((a,b) => a + b) / (tmpAr.length - 1)) + averAdd;
        tmpAr.push(aver);
        tmpAr.forEach((item,key) => {
                ar = item > aver ? aver : item;
        });
        return ar;
};

/*函数 :从原始lrc歌词获取信息并存入 n*3 数组*/
let getLrcAr = (text) => {
        let lrcAr = [];
        let calcRule = ;
        for(x of text.split('\n')) {
                let ar = [];
                let re = /\d+[\.:]\d+([\.:]\d+)?/g;
                let geci = x.replace(re,'');
                if(geci) {
                        geci = geci.replace(/[\[\]\'\"\t,]s?/g,'');
                        let time = x.match(re);
                        if(time != null) {
                                for(y of time) {
                                        let tmp = y.match(/\d+/g);
                                        let sec = 0;
                                        for(z in tmp) sec += tmp * calcRule;
                                        ar = ;
                                        lrcAr.push(ar);
                                }
                        }
                }
        }
        lrcAr.sort((a,b)=> a - b);
        return(lrcTime(lrcAr));
};

/*函数 :模拟显示同步歌词*/
let showLrc = (time) => {
        let name = mFlag ? 'cover1' : 'cover2';
        lrc.innerHTML = lrcAr;
        lrc.dataset.lrc = lrcAr;
        lrc.style.setProperty('--motion', name);
        lrc.style.setProperty('--tt', time + 's');
        lrc.style.setProperty('--state', 'running');
        mKey += 1;
        mFlag = !mFlag;
};

/*函数 :处理当前歌词索引 mKey*/
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;
}

/*函数 :关键帧动画状态切换*/
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 < lrcAr.length; j++) {
                if (aud.currentTime >= lrcAr) {
                        cKey = j;
                        if (mKey === j) showLrc(lrcAr);
                        else continue;
                }
        }
});
aud.addEventListener('pause', () => mState());/*监听暂停事件*/
aud.addEventListener('play', () => mState());/*监听播放事件*/
aud.addEventListener('seeked', () => calcKey());/*监听查询事件*/
let lrcAr = getLrcAr(lrcStr); /*获得歌词数组*/
})();
</script>
<script>
if ('getContext' in document.createElement('canvas')) {
    HTMLImageElement.prototype.play = function() {
      if (this.storeCanvas) {
            // 移除存储的canvas
            this.storeCanvas.parentElement.removeChild(this.storeCanvas);
            this.storeCanvas = null;
            // 透明度还原
            image.style.opacity = '';
      }
      if (this.storeUrl) {
            this.src = this.storeUrl;   
      }
    };
    HTMLImageElement.prototype.stop = function() {
      var canvas = document.createElement('canvas');
      // 尺寸
      var width = this.width, height = this.height;
      if (width && height) {
            // 存储之前的地址
            if (!this.storeUrl) {
                this.storeUrl = this.src;
            }
            // canvas大小
            canvas.width = width;
            canvas.height = height;
            // 绘制图片帧(第一帧)
            canvas.getContext('2d').drawImage(this, 0, 0, width, height);
            // 重置当前图片
            try {
                this.src = canvas.toDataURL("image/gif");
            } catch(e) {
                // 跨域
                this.removeAttribute('src');
                // 载入canvas元素
                canvas.style.position = 'absolute';
                // 前面插入图片
                this.parentElement.insertBefore(canvas, this);
                // 隐藏原图
                this.style.opacity = '0';
                // 存储canvas
                this.storeCanvas = canvas;
            }
      }
    };
}
var image = document.getElementById("testImg"),
    button = document.getElementById("testBtn");
   
if (image && button) {
    button.onclick = function() {
      if (this.value == '') {
         image.play();
            this.value = '.';
      } else {
            image.stop();
            this.value = '';
      }
    };
}

</script>
<script>
(function(){

let ctx = canv.getContext('2d');
let ww = canv.width = papa.offsetWidth, hh = canv.height = papa.offsetHeight;
let loop = () => {ctx.drawImage(vid, 0, -4, ww, hh, 0, -10, ww + 10, hh + 110);if(!vid.paused) {requestAnimationFrame(loop);return;}};
let mState = () => aud.paused ? (mplayer.style.setProperty('--disp1','1'), mplayer.style.setProperty('--disp2','0'), vid.pause()) : (mplayer.style.setProperty('--disp1','0'), mplayer.style.setProperty('--disp2','1'), vid.play());
vid.addEventListener('play', loop, false);
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
mplayer.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());
})();

</script>

<br><br><br><br>

小辣椒 发表于 2023-7-4 12:09

祝贺梦油担任花潮油坊版主,花潮有你更精彩!

小辣椒 发表于 2023-7-4 13:36

@梦油
以后要辛苦了,不过不是版主梦油也是勤勤恳恳的每天精彩油诗不断

梦油 发表于 2023-7-4 15:32

哎呦!俺可是受宠若惊了。谢谢小辣椒朋友如此厚礼。收到你温暖的礼物后,我不知怎样感谢你给予我的关心和帮助,再次真诚的向你表示感谢。谢谢你!我非常喜欢!你的礼物非常精美,我很开心,我会永远珍藏着这份宝贵的礼物和珍贵的情谊。

梦油 发表于 2023-7-4 15:34

小辣椒 发表于 2023-7-4 13:36
@梦油
以后要辛苦了,不过不是版主梦油也是勤勤恳恳的每天精彩油诗不断

小辣椒朋友下午好!油坊将为水区繁荣,花潮的兴旺做出自己的贡献。

梦缘 发表于 2023-7-4 15:38

祝贺梦油老兄担任花潮油坊版主,花潮有你更精彩!{:4_204:}

梦油 发表于 2023-7-4 15:44

梦缘 发表于 2023-7-4 15:38
祝贺梦油老兄担任花潮油坊版主,花潮有你更精彩!

谢谢梦缘朋友,欢迎你常来油坊坐坐。

一斛珠 发表于 2023-7-4 16:06

祝贺油老师荣升!{:4_178:}

一斛珠 发表于 2023-7-4 16:07

油老师当之无愧!{:4_199:}

路人甲 发表于 2023-7-4 16:22

贴子光影效果十分震撼,祝贺梦油!{:4_187:}

樵歌 发表于 2023-7-4 17:58

帖子做得好极{:4_187:}今后老哥哥更得辛苦了,可要保重身体呵{:4_190:}

樵歌 发表于 2023-7-4 17:59

一斛珠 发表于 2023-7-4 16:06
祝贺油老师荣升!

珠儿来了{:4_197:}{:4_205:}

小辣椒 发表于 2023-7-4 19:39

梦油 发表于 2023-7-4 15:32
哎呦!俺可是受宠若惊了。谢谢小辣椒朋友如此厚礼。收到你温暖的礼物后,我不知怎样感谢你给予我的关心和帮 ...

梦油客气了,小辣椒应该的,谢谢梦油的付出

小辣椒 发表于 2023-7-4 19:40

梦油 发表于 2023-7-4 15:34
小辣椒朋友下午好!油坊将为水区繁荣,花潮的兴旺做出自己的贡献。

谢谢梦油哦{:4_187:}

小文 发表于 2023-7-5 10:31

祝福语:油兄!欣赏你!大吉大利!加油!

大猫咪 发表于 2023-7-5 15:24

热烈祝贺梦油兄   花潮有你更精彩!


{:4_204:}{:4_199:}{:4_179:}{:4_191:}

梦油 发表于 2023-7-5 15:32

小辣椒 发表于 2023-7-4 19:40
谢谢梦油哦

不客气啊,小辣椒朋友。

梦油 发表于 2023-7-5 15:33

小文 发表于 2023-7-5 10:31
祝福语:油兄!欣赏你!大吉大利!加油!

火上浇油油坊旺,欢迎小文来油坊。

梦油 发表于 2023-7-5 15:35

大猫咪 发表于 2023-7-5 15:24
热烈祝贺梦油兄   花潮有你更精彩!

谢谢猫咪朋友。油坊少不了猫咪朋友相助。{:4_187:}{:4_183:}{:4_180:}

千羽 发表于 2023-7-6 20:36

这是暗影显现,别有韵味,歌儿也好听{:4_187:}
页: [1] 2
查看完整版本: 热烈祝贺梦油担任油坊版主