普陀申木 发表于 2024-11-2 17:32

纳西情歌 - 陈思思

<style>
#papa{ margin: 30px 0 30px calc(50% - 641px);width: 1200px;box-shadow: 0px 0px 0px 0px #cccccc, 0px 0px 0px 0px #880000; overflow: hidden;height: 720px;background: url('https://pic.imgdb.cn/item/64ec273e661c6c8e54c0d806.jpg') no-repeat center/cover;border: 0px solid;display: grid;position: relative;z-index: 12345; --state: running;}
#hWindow         {
                width:1164px;
                height:640px;
               
                bbbackground-size:cover;
                background-color:;font-size:18px;
                bbbborder:thick brown ridge;
                position:relative;
                margin:10px80px;
                overflow:hidden;
                border-radius:0px;

        }
        #curp        {
                width: 100%;
                height:100%;
               
               
                transform-origin: center;
                position:absolute; top:0px; left:0px;
        }
#mtitle        {color: transparent;background: linear-gradient(45deg, #FF00FF5%,Aquamarine 34%,Azure 50%,LightSeaGreen 66%,LightSkyBlue 79%,#FFFF00 93%);-webkit-background-clip: text;
        -webkit-text-stroke:1px rgb(0,71,171);        font:bold 3.0em 华文隶书;
        }
#vid { position: absolute; width: 65%; height: 100%; top: -30px; object-fit: cover; opacity: 1;auto;filter:contrast(120%);transform: scale(1.1, 1.1) }
   .vidI { position: absolute; width: 600px; height: 400px;MARGIN-LEFT:650px;margin-top:450px; object-fit: cover; opacity: 1; clip-path: circle(100% at bottom) ; }
.photo {width: 30%; height: 50%;
    position: absolute;z-index: 1;
    top:150px; left:400px;
    opacity: 30%;
    animation: round 180s linear infinite;}
@keyframes round {
0% { -webkit-transform:rotate(0)scale(1)translate(0%,0%); opacity:0}
2% { -webkit-transform:rotate(0)scale(1.5)translate(-10%,0%); opacity:1}
4% { -webkit-transform:rotate(0)scale(1.5)translate(0%,10%)rotateZ(0deg); opacity:1}
6% { -webkit-transform:rotate(0)scale(1.5)translate(0%,-10%)rotateZ(0deg); opacity:1}
8% { -webkit-transform:rotate(0)scale(1.5)translate(10%,0%)rotateZ(0deg); opacity:1}
10% { -webkit-transform:rotate(0deg)scale(1.5)translate(0%,0%)rotateZ(0deg); opacity:0}
}
img:nth-child(1) {animation-delay: 162s;}
img:nth-child(2) {animation-delay: 144s;}
img:nth-child(3) {animation-delay: 126s;}
img:nth-child(4) {animation-delay: 108s;}
img:nth-child(5) {animation-delay: 90s;}
img:nth-child(6) {animation-delay: 72s;}
img:nth-child(7) {animation-delay: 54s;}
img:nth-child(8) {animation-delay: 36s;}
img:nth-child(9) {animation-delay: 18s;}
img:nth-child(10) {animation-delay: 0s;}
.stop img:nth-child(1),
.stop img:nth-child(2),
.stop img:nth-child(3),
.stop img:nth-child(4),
.stop img:nth-child(5),
.stop img:nth-child(6),
.stop img:nth-child(7),
.stop img:nth-child(8),
.stop img:nth-child(9),
.stop img:nth-child(10){animation-play-state: paused;}

#dt{position: absolute;top:0%; left:0%;width: 100%;height: 100%;mix-blend-mode: lighten;z-index: 3; transform: rotateX(0deg);}
#prog { position: absolute; bottom: 60px; width: 180px; height: 12px; background: linear-gradient(to right, snow var(--prg), gray 0) repeat-x 0 50% / 100% 1px;left:12%; color: snow; display: grid; place-items: center; --prg: 0%; --state: paused; z-index: 999;}
#prog::before, #prog::after { position: absolute; top: 0px; }
#prog::before { content: attr(data-cu); left: 0; }
#prog::after { right: 0; content: attr(data-du); }
#slider { position: absolute; width: 3px; height: 7px; background: snow; left: var(--prg); }
#btnplay { position: absolute; top: -80px;font: normal 3.3em/0em serif;
color:#ffffff; cursor: pointer; animation: rot 6s infinite linear var(--state); }
@keyframes rot { to { transform: rotate(1turn); } }

#lrc {
      --state: paused;
      --motion: cover2;
      --tt: 2s;
      --bg: linear-gradient(0deg, #ff0000, #ff0000, #ff0000);
      position: absolute;z-index: 6;
      left: 52%;
      transform: translate(-50%);
      top: 85%;
      font:normal 3em 华文行楷;
      font-weight:800;
      color: #0000;
      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{   0% { width: 100%;transform:rotate(0deg)scale(0)}100% { width: 100%;transform:rotate(0deg)scale(1);filter:hue-rotate(360deg)}}
@keyframes cover2 {    0% { width: 100%;transform:rotate(0deg)scale(0)}100% { width: 100%;transform:rotate(0deg)scale(1);filter:hue-rotate(360deg)}}
#papa:hover #fullscreen { display:block ;}
#fullscreen { position: absolute; top:5%; left:85%;color:#ffffff; filter:drop-shadow( 1px 1px 1px #000000);font: normal 2.0em 华文隶书; opacity: 1; cursor: pointer; z-index: 1111}
                        </style>

<div id="papa">
<video id="vid" src="https://img.tukuppt.com/video_show/2269348/00/14/14/5e1bc0bf7964a.mp4" muted="muted" autoplay="autoplay" loop="loop"></video>
   <video class="vidI" src="https://img.tukuppt.com/video_show/2269348/00/01/98/5b4eb8be1a9b0.mp4                                               
"style="-webkit-mask-image: radial-gradient(black 30% ,transparent 70%)" autoplay="autoplay" loop="loop" muted="muted"></video>

<span id="fullscreen">全屏观赏</span>
<div id='dt'><img id="Img" src="http://dashan.link/html/an.png" width="100%" height="100%"></div>

<div id="testImg" >
<img class="photo" src="https://pic.imgdb.cn/item/6503e1a6661c6c8e545f85a2.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a6661c6c8e545f85ae.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a6661c6c8e545f85bb.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a8661c6c8e545f85e5.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a8661c6c8e545f85f7.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a8661c6c8e545f861c.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a9661c6c8e545f863a.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1aa661c6c8e545f866f.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a9661c6c8e545f864c.png" /><img class="photo"
src="https://pic.imgdb.cn/item/6503e1a6661c6c8e545f85bb.png" />
</div>
<div id="rotate-words">
   <div>纳西情歌 - 陈思思<br />
    <span>词曲:百慕三石</span></div>
<div>清清丽江水<br />
    <span>会让你沉醉</span></div>
<div>幽幽古道<br />
    <span>那千年的秀美</span></div>
<div>大石桥上<br />
    <span>来相会</span></div>
<div>玉龙雪山 <br />
    <span>倒映在 </span></div>
</div>
<style type="text/css">
#rotate-words {text-align:center;
position:absolute;z-index: 2;
top:0%;
left:-30%;
padding:20% 0;
font-size:3em;filter:drop-shadow(#ffffff 1px 1px 0px);
color:#ff0000;
font-family: '华文隶书', sans-serif;
}
#rotate-words span {
display:block;
height:80px;
font-size:.7em;color:#000078;
text-transform:lowercase;
opacity:0.8;
font-family: '华文隶书', sans-serif;
}
#rotate-words div {
position:absolute;
opacity:0;
overflow:hidden;
left:10vw;
width:80vw;
line-height:1.2em;
animation: rotate-word 36s linear 2 0s;
}
@keyframes rotate-word         {0% {
          opacity: 0;
          transform: translatex(-300%);
        }
        8% {
          opacity: 1;
          transform: translatex(0%);
        }
        17% {
          opacity: 1;
          transform: translatex(0%);
        }
        19% {
          opacity: 0;
          transform: translatex(100%);
        }
        25% { opacity: 0 }
        100% { opacity: 0 }
}
#rotate-words div:nth-child(2) { animation-delay: 6s}
#rotate-words div:nth-child(3) { animation-delay: 12s}
#rotate-words div:nth-child(4) { animation-delay: 18s}
#rotate-words div:nth-child(5) { animation-delay: 24s}
#rotate-words div:nth-child(6) { animation-delay: 30s}
</style>
<div id="mydiv"></div>
<divid="img_border" ></div>
<div id="hWindow">
    <div id="curp"></div>
    <div style="width:900px; height:600px;position:relative;margin-top: 20px;
        margin-left: 50px;overflow:hidden;"> <span id="mtitle" >纳西情歌 - 陈思思</span> </div>
</div>
<div id="lrc" data-lrc="博客"></div>
    <div id="prog" data-cu="00:00" data-du="00:00" title="调节进度">
       <span id="btnplay" title="播放/暂停"> <P id="btn" >❊</p></span>
         <span id="slider"></span>
    </div>
</div>

<audio id="aud" src="https://fs-im-kefu.7moor-fs1.com/ly/4d2c3f00-7d4c-11e5-af15-41bf63ae4ea0/1730451475936/纳西情歌 - 陈思思.mp3
" autoplay="" loop=""></audio>
<script>
let toMin = (val) => { if (!val) return '00:00'; let min = parseInt(val / 60), sec = parseFloat(Math.floor(val) % 60); if(sec < 10) sec = '0' + sec; return min + ':' + sec; }
let mState = () => prog.style.setProperty('--state', aud.paused ? 'paused' : 'running');
aud.addEventListener('pause', mState, false);
aud.addEventListener('play', mState, false);
aud.addEventListener('timeupdate', () => { prog.style.setProperty('--prg', aud.currentTime / aud.duration * 100 + '%'); prog.dataset.cu = toMin(aud.currentTime); prog.dataset.du = toMin(aud.duration); });
btnplay.onclick = (e) => { e.stopPropagation(); aud.paused ? aud.play() : aud.pause(); }
prog.onclick = (e) => aud.currentTime = e.offsetX * aud.duration / prog.offsetWidth;
</script>

<script>
let toMin = (val) => { if (!val) return '00:00'; let min = parseInt(val / 60), sec = parseFloat(Math.floor(val) % 60); if(sec < 10) sec = '0' + sec; return min + ':' + sec; };
let mState = () => mplayer.style.setProperty('--state', aud.paused ? 'paused' : 'running');
aud.addEventListener('play', mState, false);
aud.addEventListener('pause', mState, false);
aud.addEventListener('timeupdate', () => {
      let prg = aud.currentTime / aud.duration * 100 + 20;
      mplayer.style.setProperty('--prg', prg + '%');
});
btnP1.onclick = btnP2.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('timeupdate', () => { mplayer.style.setProperty('--prg', aud.currentTime / aud.duration * 100 + '%');mplayer.dataset.tt = toMin(aud.currentTime) + '\n' + toMin(aud.duration);for (j = 0; j < data.lrcAr.length; j++) { if (aud.currentTime >= data.lrcAr) { if (mKey === j) showLrc(data.lrcAr);   else continue; } } });
progP.onclick = (e) => aud.currentTime = e.offsetX * aud.duration / progP.offsetWidth;
</script>
<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); /*获得歌词数组*/
})();
let fs = true;
      fullscreen.onclick = () => {
                fs ? (fullscreen.innerText = '退出全屏',papa.requestFullscreen()) : (fullscreen.innerText = '全屏观赏', document.exitFullscreen());
                fs = !fs;
      };

</script>

梦江南 发表于 2024-11-2 17:40

漂亮的音画,欣赏点赞!{:4_199:}

起个网名好难 发表于 2024-11-2 18:34

欣赏漂亮大气的美帖

红影 发表于 2024-11-2 18:58

漂亮的图片轮播效果。歌声好听,视频效果氛围热烈。
欣赏普陀申木老师好帖{:4_199:}

梦油 发表于 2024-11-2 21:16

分享美图、美曲。

小辣椒 发表于 2024-11-2 23:30

欣赏老师的精彩制作。

视频效果没有全屏出来,感觉花朵画面不一致了,你可以视频全屏,减低透明度,试试效果,这样下雨的效果整体画面显示了
页: [1]
查看完整版本: 纳西情歌 - 陈思思