东篱闲人 发表于 2023-7-26 18:50

梁祝


<style>
#papa { margin: 20px -300px; width: 1164px; height: 620px;LEFT: 30px;background: gray url('https://pic.imgdb.cn/item/64c0f7b41ddac507cc2c9737.jpg') center/cover no-repeat; box-shadow:0 0px 0px 3px #800000; position: relative; z-index: 1; --state: running; overflow:hidden;}
#lrc { --motion: cover2; --tt: 1s; position: absolute; left: 50%;top:82%; transform: translate(-50%, 10px);font:normal 2em 华文隶书; color:#ff0000;filter:hue-rotate(0deg)contrast(120%)brightness(200%);filter: drop-shadow( 2px 2px 0px #000000); z-index: 21; }
#lrc::before { position: absolute; content: attr(data-lrc); width: 100%; height: 100%; color: transparent; overflow: hidden; white-space: pre;background: linear-gradient(0deg, #1E9600 0%,#FFF200 50%,#FF0000 100%);background-size: 10vmin 125%;background-position: center center; filter: drop-shadow( 0px 0px 1px #000000)drop-shadow( 0px 0px 1px #000000)drop-shadow( 0px 0px 1px #000000)drop-shadow( 0px 0px 1px #000000); -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
#mplayer { position: absolute; width: 380px; height: 520px;left: 50%; z-index: 20;top:10%;overflow:hidden;-webkit-mask-image: radial-gradient(black 25% ,transparent 65%);}
#an{position: absolute;
      top:0%; left:0%;
      width: 100%;
      height:100%;
         
   }
@keyframes cover1{0% {
opacity: 1;clip-path:inset(0% 100% 0% 100% round 0 0% 0 0%);
filter:hue-rotate(0deg)contrast(120%)brightness(200%);}
20% {
opacity: 1;clip-path: inset(0% 0 0% 0 round 0 0% 0 0%);
filter:hue-rotate(0deg)contrast(120%)brightness(800%);}

}
@keyframes cover2 {0% {
opacity: 1;clip-path:inset(0% 100% 0% 100% round 0 0% 0 0%);
filter:hue-rotate(0deg)contrast(120%)brightness(200%);}
20% {
opacity: 1;clip-path: inset(0% 0 0% 0 round 0 0% 0 0%);
filter:hue-rotate(0deg)contrast(120%)brightness(800%);}
}
</style>
<div id="papa">
<div id="mydiv"></div>

<div id="lrc" data-lrc="梁祝">梁祝</div>



<div id="mplayer">
<img id="an"src="https://pic.imgdb.cn/item/64c0ebb41ddac507cc16e14b.gif" width="100%" height="100%"></div>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1872013772.mp3" autoplay loop></audio>


<script>
(function() {
        let mKey = 0, mFlag = true;
        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;};
        let averAdd = 0, offset = 0;
        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 geci = ` 作词 : 阎肃 作曲 : 何占豪/陈刚
配图:东篱闲人
碧草青青花盛开
彩蝶双双久徘徊
千古传颂生生爱
山伯永恋祝英台
同窗共读整三载
促膝并肩两无猜
十八相送情切切
谁知一别在楼台
楼台一别恨如海
泪染双翅身化彩蝶
翩翩花丛来
历尽磨难真情在
天长地久不分开
历尽磨难真情在
天长地久不分开



];
`;
        let lrcAr = getLrcAr(geci);
        let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrcAr;lrc.dataset.lrc = lrcAr.replace(/<br>/, '\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');papa.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};
        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 = () => papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');
        aud.addEventListener('pause', () => mState());
        aud.addEventListener('play', () => mState());
        aud.addEventListener('seeked', () => calcKey());
        aud.addEventListener('timeupdate', () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime >= lrcAr) {if (mKey === j) showLrc(lrcAr);else continue;}}});
        mplayer.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());
})();
</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("an"),
    button = document.getElementById("mplayer");
    if (image && button) {
    button.onclick = function() {
      if (this.value == '') {
         image.play();
            this.value = '.';
      } else {
            image.stop();
            this.value = '';
      }
    };
}

</script>
<style>
#mydiv {
      margin: 0px auto;
      width: 1164px;
      height: 620px;
      
      overflow: hidden;
      cursor: pointer;
      position: relative;
      --state: paused;
}
.dot {
      position: absolute;
      left: 40%;
      bottom: -10px;
      width:200PX;opacity:0;
      height:210PX;
      border-radius: 0%;
      background: url('https://pic.imgdb.cn/item/643c03fe0d2dde5777107ce2.png')0 0/100% 100%;
}
@keyframes ani { to { transform: rotate(var(--deg)) translateY(-620px); filter:hue-rotate(360deg);opacity:1;}}
</style>
<script>
Array.from({length: 100}).forEach( (item,key) => {
      let sp = document.createElement('span');
      let ww = Math.random() * 5 + 2;
      sp.className = 'dot';
      sp.style.cssText += `
                --deg: ${-100 + Math.random() * 200}deg;
               
               
                animation: ani 10s ${Math.random() * key - 2}s infinite alternate var(--state);
      `;
      mydiv.appendChild(sp);
});
let mState = () => mydiv.style.setProperty('--state', aud.paused ? 'paused' : 'running');
aud.addEventListener('play', mState, false);
aud.addEventListener('pause', mState, false);
</script>


</td></tr></table>


</div>
<div id="comment_1882932" class="cm">
</div>

<h3 class="psth xs1"><span class="icon_ring vm"></span></h3>
<dl id="ratelog_1882932" class="rate">
<dd style="margin:0">
<div id="post_rate_1882932"></div>
<table class="ratl">
<tr>

红影 发表于 2023-7-26 20:22

这个还真的和心目中的梁祝相伴的场景,欣赏东篱大哥好帖{:4_187:}

红影 发表于 2023-7-26 20:24

没找到播放器按钮呢,有手型标志的地方点击了无法停止,倒是没标志的动图附近点了可以暂停呢{:4_173:}

东篱闲人 发表于 2023-7-26 20:28

红影 发表于 2023-7-26 20:24
没找到播放器按钮呢,有手型标志的地方点击了无法停止,倒是没标志的动图附近点了可以暂停呢

停啥啊,听吧。。。{:5_117:}

红影 发表于 2023-7-27 09:54

东篱闲人 发表于 2023-7-26 20:28
停啥啊,听吧。。。

习惯性地找啊,因为有些帖子里的按钮是隐藏的,弄得我看不到就鼠标划拉{:4_173:}

东篱闲人 发表于 2023-7-27 10:30

红影 发表于 2023-7-27 09:54
习惯性地找啊,因为有些帖子里的按钮是隐藏的,弄得我看不到就鼠标划拉

强迫症。。。{:4_189:}

红影 发表于 2023-7-27 20:05

东篱闲人 发表于 2023-7-27 10:30
强迫症。。。

真的,都被弄得条件反射了{:4_173:}

东篱闲人 发表于 2023-7-27 20:11

红影 发表于 2023-7-27 20:05
真的,都被弄得条件反射了

{:4_172:}

红影 发表于 2023-7-27 20:56

东篱闲人 发表于 2023-7-27 20:11


虽然这个里面什么都没划拉出来{:4_189:}

梦油 发表于 2023-7-27 21:11

本帖最后由 梦油 于 2023-7-27 21:18 编辑

《梁祝》是我很喜欢的乐曲之一。早年我就购买了各种乐器演奏的《梁祝》录音盒带和 c t 盘。《梁祝》旋律简洁优美,具有浓郁的中国民族音乐特色。我很喜欢听郑绪岚和牟炫甫演唱的《梁祝》和盛中国演奏的小提琴曲《梁祝》。谢谢你,东篱闲人朋友。分享了。

东篱闲人 发表于 2023-7-27 21:18

梦油 发表于 2023-7-27 21:11
《梁祝》是我很喜欢的乐曲之一。早年我就购买了各种乐器演奏的《梁祝》录音盒带和 c t 盘。《梁祝》旋律简 ...

老梦高雅。。。{:5_116:}

梦油 发表于 2023-7-28 14:50

东篱闲人 发表于 2023-7-27 21:18
老梦高雅。。。

东篱闲人朋友下午好!我喜欢老歌、红歌、民歌和严肃音乐。比如:化蝶、浏阳河、蝴蝶泉边、蓝色多瑙河……你喜欢这些歌曲吗?

东篱闲人 发表于 2023-7-28 22:02

梦油 发表于 2023-7-28 14:50
东篱闲人朋友下午好!我喜欢老歌、红歌、民歌和严肃音乐。比如:化蝶、浏阳河、蝴蝶泉边、蓝色多瑙河…… ...

嗯嗯嗯,喜欢。。。

梦油 发表于 2023-7-29 11:20

东篱闲人 发表于 2023-7-28 22:02
嗯嗯嗯,喜欢。。。

我们上了年纪的多数人对红歌、老歌……情有独钟。

东篱闲人 发表于 2023-7-29 16:38

梦油 发表于 2023-7-29 11:20
我们上了年纪的多数人对红歌、老歌……情有独钟。

{:4_181:}
页: [1]
查看完整版本: 梁祝