焱鑫磊 发表于 2023-5-3 00:47

《玫瑰恋情》任妙音

<style>
#papa { margin: 110px -150px; width: 1164px; height: 620px; background: gray url('https://pic2.imgdb.cn/item/64512ec70d2dde57774ed0af.jpg') center/cover no-repeat; box-shadow:0 0px 0px 3px #ffffff; position: relative; z-index: 1; --state: running; overflow:hidden;}
#lrc { --motion: cover2; --tt: 1s; position: absolute; left:85%;top:50px; transform: translate(-50%, 10px);font:normal 2.5em/ 40px 华文隶书; color:#0000;filter:hue-rotate(360deg)contrast(120%)brightness(200%)drop-shadow( 0px 2px 0px #ffffff); z-index: 2; writing-mode: vertical-rl;}
#lrc::before { position: absolute; content: attr(data-lrc); width: 100%; height: 100%; color: transparent; overflow: hidden; white-space: pre;background:#E00000 ; filter: drop-shadow( 0px 0px 1px #ffffff)drop-shadow( 0px 0px 1px #ffffff)drop-shadow( 0px 0px 1px #ffffff)drop-shadow( 0px 0px 1px #ffffff); -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state);writing-mode: vertical-rl; }
@keyframes cover1{0% { width: 100%;letter-spacing: 10px; height: 0; }100% { width: 100%; height: 300%;letter-spacing: 0px;color:#000080; } }
@keyframes cover2 {0% { width: 100%;letter-spacing: 10px; height: 0; }100% { width: 100%; height: 300%;letter-spacing: 0px;color:#000080; } }

#clock {z-index: 20;
        margin: 350px 580px;
        width: 280px;
        height: 150px;
          color: #eeeeee;
       border-radius: 0px 150px 0px 150px;
        display: grid;background: url('https://pic2.imgdb.cn/item/64512f000d2dde57774f157b.jpg') center/cover no-repeat;
box-shadow:0 0px 0px 2px #ffffff;

        place-items: center;
        position: relative;
        cursor: pointer;
        opacity: 1;
        --state: paused;
}
#clock::before, #clock::after {
        position: absolute;
        content: '';
        width: 3px;
        height: 68px;
}
#clock::after {
        --deg: 360deg;
        bottom: 50%;
        background: #00ff00;
        opacity: 1;
        transform-origin: 50% 100%;
        animation: rot var(--time) infinite linear var(--state);
}
#clock::before {
        --deg: 25deg;
        top: 50%;
        background: #ff0000;
        transform: rotate(-45deg);
        transform-origin: 50% 0;
        animation: rot .3s infinite alternate linear var(--state);
}
#clock > span {
        position: absolute;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #eeeeee;
        z-index: 2;
}
#clock > span:nth-of-type(2) {
        top: 0px;
        width: 0px;
        height: 0px;
        background: #cccccc;
}
@keyframes rot {
        to {transform: rotate(var(--deg)); }}
#dt { position: absolute; width: 400px; height: 400px;left: 10%; z-index: 6;top:45%;overflow:hidden;}
#an{position: absolute;width: 100%; height: 100%;left: 0%; z-index: 6;top:0%;
   }
.photo {width: 50%; height: 55%;
position: absolute;z-index: 1;border-radius: 600px 0px 650px 0px;
top:20px; left:400px;filter:contrast(120%)brightness(100%);
opacity: 0;box-shadow:0 0px 0px 2px #ffffff;
animation-name: round ;animation-duration: 48s;
               animation-iteration-count: infinite;
                animation-timing-function: linear;
}

@keyframes round {0% { opacity: 0;
    animation-timing-function: ease-in; }
    4% { opacity: 1;
         animation-timing-function: ease-out; }
    17% { opacity: 1 }
    25% { opacity: 0 }
    100% { opacity: 0 }
}
.photo:nth-child(1) {background:url(https://pic2.imgdb.cn/item/645135540d2dde577757e942.jpg)0 0/100% 100%;
}
.photo:nth-child(2) {background:url(https://pic2.imgdb.cn/item/6451353b0d2dde577757c793.jpg)0 0/100% 100%;
animation-delay: 6s;
}
.photo:nth-child(3) {background:url(https://pic2.imgdb.cn/item/645135220d2dde577757a9f8.jpg)0 0/100% 100%;
animation-delay: 12s;
}
.photo:nth-child(4) {background:url(https://pic2.imgdb.cn/item/6451356e0d2dde5777580ad8.jpg)0 0/100% 100%;
animation-delay: 18s;
}
.photo:nth-child(5) {background:url(https://pic2.imgdb.cn/item/645135840d2dde5777582842.jpg)0 0/100% 100%;
animation-delay: 24s;
}
.photo:nth-child(6) {background:url(https://pic2.imgdb.cn/item/6451359a0d2dde57775847bf.jpg)0 0/100% 100%;
animation-delay: 30s;
}
.photo:nth-child(7) {background:url(https://pic2.imgdb.cn/item/645135b50d2dde5777586e64.jpg)0 0/100% 100%;
animation-delay: 36s;
}
.photo:nth-child(8) {background:url(https://pic2.imgdb.cn/item/645135cd0d2dde5777588c1d.jpg)center/cover no-repeat;
animation-delay: 42s;
}

.st img:nth-child(1) {
animation-play-state: paused;
}
.st img:nth-child(2){
animation-play-state: paused;
}
.stimg:nth-child(3){
animation-play-state: paused;
}
.st img:nth-child(4){
animation-play-state: paused;
}
.st img:nth-child(5){
animation-play-state: paused;
}
.st img:nth-child(6){
animation-play-state: paused;
}
.st img:nth-child(7) {
animation-play-state: paused;
}
.st img:nth-child(8) {
animation-play-state: paused;
}
</style>
<div id="papa">
<div id="testImg"><img class='photo '><img class='photo ' ><img class='photo '><imgclass='photo '><img class='photo ' ><img class='photo '><imgclass='photo '><imgclass='photo '></div>
<div id="dt">
<img id="an"src="http://chuangshicdn.data.mvbox.cn/album/23/04/16/23041613295221266412.gif" width="100%" height="100%"></div>
<div id="clock">00:00 &nbsp; &nbsp; 00:00<span></span><span></span></div>
<div id="lrc" data-lrc="焱鑫磊博客">焱鑫磊博客</div>
</div>

<audio id="aud" src="https://www.joy127.com/url/104445.mp3" loop autoplay></audio>

<script>

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;};
clock.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());
aud.addEventListener('play', () => clock.style.setProperty('--state','running'));
aud.addEventListener('pause', () => clock.style.setProperty('--state','paused'));
aud.addEventListener('canplay', () => clock.style.setProperty('--time',aud.duration + 's'));
aud.addEventListener('timeupdate', () => clock.innerHTML = toMin(aud.currentTime) + ' &nbsp; &nbsp; ' +toMin(aud.duration) + '<span></span><span></span>');

</script>

<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 = `《玫瑰恋情》任妙音
词:汪晓林 曲:颂今
LRC歌词制作:焱鑫磊
又是一年玫瑰花儿开
我乘坐列车来到这美丽的清迈
花香丛中寻觅着你
风吹花海翻卷着我的情怀
就是在这个浪漫的季节
我和你相遇情窦初开
你的美丽赛过鲜花
让我的心儿荡了起来
啊你的美丽
让我的心儿荡了起来
又是一年玫瑰花儿开
我乘坐列车又来到美丽的清迈
花枝摇曳朵朵是你
花香阵阵拂动着我的心海
就是在这个迷人的城市
我和你重逢相知相爱
你的歌声赛过百灵
让我俩从此不再分开
啊你的歌声
让我俩从此不再分开
啊啊啊啊
你的歌声赛过百灵
让我俩从此不再分开
啊你的歌声
让我俩从此不再分开
啊你的歌声
让我俩从此不再分开
`;
        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 >
var image= document.getElementById("testImg"),
    button = document.getElementById("clock");
   
if (image.classList && image && button) {
    button.onclick = function() {
      if (this.value == '.') {
            image.classList.remove('st');
            this.value = '*';
      } else {
            image.classList.add('st');
            this.value = '.';
      }
    };
}
</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("clock");
    if (image && button) {
    button.onclick = function() {
      if (this.value == '') {
         image.play();
            this.value = '.';
      } else {
            image.stop();
            this.value = '';
      }
    };
}

</script>

蓝魔 发表于 2023-5-3 20:45

欣赏一下,谢谢。

巫荣云师 发表于 2023-5-3 21:06

欣赏收藏老师的[音乐专辑]好看又好听,点赞!

焱鑫磊 发表于 2023-5-4 21:08

蓝魔 发表于 2023-5-3 20:45
欣赏一下,谢谢。

问候朋友好!:handshake

焱鑫磊 发表于 2023-5-4 21:08

巫荣云师 发表于 2023-5-3 21:06
欣赏收藏老师的[音乐专辑]好看又好听,点赞!

问候朋友好!:handshake

那片海 发表于 2023-5-4 23:41

谢谢楼主!!!!!!!!

焱鑫磊 发表于 2023-5-5 13:37

那片海 发表于 2023-5-4 23:41
谢谢楼主!!!!!!!!

问候老师好!{:1_292:}
页: [1]
查看完整版本: 《玫瑰恋情》任妙音