有声有色 发表于 2023-4-11 12:04

评弹——琴调

本帖最后由 有声有色 于 2023-4-12 08:58 编辑 <br /><br /><style>
      #papa { margin:0-214px ; width: 1024px; height: 600px; background: rgba(0,0,0,.45) url('https://img-baofun.zhhainiao.com/pcwallpaper_ugc/preview_jpg/7ef199de888843722d6c4690a19ee441.jpg?x-oss-process=image%2fresize%2cm_lfit%2cw_2560%2ch_1440') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display: grid; place-items: center; overflow: hidden; position: relative; z-index: 1; }
      #mplayer { position: absolute; bottom: 0; width: 300px; height: 80px; user-select: none; display: grid; place-items: center; cursor: pointer; }
      #mplayer:hover #btnwrap, #mplayer:hover #prog { transform: translateY(var(--yy)); }
      #mplayer:hover #btnwrap { background: linear-gradient(to top right, purple, orange); border-radius: 50%; opacity: .75;z-index: 4 }
      #btnwrap, #prog { position: absolute; display: grid; place-items: center; transition: .5s; }
      #btnwrap { --yy: -15px; width: 40px; height: 40px; transform: rotate(45deg); border: 1px solid tan; border-radius: 6px; opacity: 0;z-index: 4}
      #btnplay { width: 20px; height: 20px; transform: translateX(3px); background: #eee; clip-path: polygon(0 0, 0% 100%, 100% 50%); z-index: 4}
      #btnpause { width: 2px; height: 20px; border-style: solid; border-width: 0px 4px; border-color: transparent #eee; display: none;z-index: 4 }
      #prog { --yy: 20px; width: 300px; height: 16px; border-radius: 10px; background: linear-gradient(90deg, orange, purple 100%, transparent 0);font: normal 14px / 16px sans-serif; color: #ff0000; text-shadow: 1px 1px 0 #000; opacity: .8; z-index: 4}
      #lrcwrap { position: absolute; top: 460px; font: bold 2.4em 'KaiTi',sans-serif; z-index: 4}
      #lrc1, #lrc2 { width: 100%; height: 100%; color: rgba(0,0,0,.3); white-space: nowrap; }

#lrc1{ width: 100%; height: 100%; color: #000079; white-space: nowrap;filter:drop-shadow(#FFF080 1px 0 0)drop-shadow(#FFF080 0 1px 0)drop-shadow(#FFF080 -1px 0 0) drop-shadow(#FFF080 0 -1px0);}

      #lrc2 { position: absolute; top: 0px; left: 0px; color: #ff003c; overflow: hidden;filter:drop-shadow(#000080 1px 0 0)drop-shadow(#1cf688 0 1px 0)drop-shadow(#1cf688 -1px 0 0) drop-shadow(#000080 0 -1px0); }
      #mpic { position: absolute; transform: rotateY(0deg); top: 0px; left: 300px; width: 400px;height: 400px; animation: rote 0.1s linear infinite; cursor: pointer; z-index: 3}


@keyframes rote   {0%{opacity: 0;transform:translate(0%,0%)scale(1);}
    50% {opacity: 1;filter:hue-rotate(360deg);transform:translate(0%,0%)scale(2);}

100%{opacity: 0;filter:hue-rotate(0deg);transform:translate(0%,0%)scale(5);}

}
@keyframes fly { from { offset-distance: 0%; } to { offset-distance: 100%; } }
      @keyframes mov1 { from { width: 0%;} to { width: 100%; } }
      @keyframes mov2 { from { width: 0%;} to { width: 100%; } }
#vid { position: absolute; width: 1024px; height: 600px; top: 0px; object-fit: cover; opacity: 1; z-index: 2}
#vid1 { position: absolute; width: 1024px; height: 600px; top: 0px; object-fit: cover; opacity: 0.65; z-index: 2}

#disc { position: absolute; width: 100px; height: 100px; left: 30px; bottom: 30px; border:2px solid #000000;background: url(http://pan.yinhuabbs.cn/view.php/a60d7a6c4172d96080d4e23d80d9af48.png)0 0/100% 100%,conic-gradient(red,orange,yellow,green,teal,blue,#ff0000); mask: radial-gradient(transparent 7px,#red 0);-webkit-mask: radial-gradient(transparent 7px,red 0); border-radius: 50%; cursor: pointer; animation: rot 4s linear infinite; z-index: 20;transform: rotateX(45deg) rotateY(20deg) rotate(0deg);}

@keyframes rot {0% {transform: rotateX(45deg) rotateY(20deg) rotateZ(0deg);}
100% {transform: rotateX(45deg) rotateY(20deg) rotateZ(360deg);}
}
</style>

<div id="papa" data-lr="no">

<video id="vid" src="//img.tukuppt.com/video_show/3664703/00/01/99/5b4eb9986b36e.mp4" muted="muted" autoplay="autoplay" loop="loop"></video>

      <div id="lrcwrap">
                <span id="lrc1">花潮lrc在线</span>
                <span id="lrc2">花潮lrc在线</span>
      </div>
<span id="disc"></span>
      <div id="mplayer">
                <div id="btnwrap"><span id="btnplay"></span><span id="btnpause"></span></div>
                <div id="prog">00:00 | 00:00</div>
      </div>
</div>

<script>
let mKey = 0, mFlag = true, aud = new Audio();
let lrcAr = [
                ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
aud.src = 'https://link.hhtjim.com/163/342429.mp3';
aud.autoplay = true;
aud.loop = true;


disc.style.animationPlayState = aud.paused ? 'paused' : 'running';

aud.addEventListener('playing', () => disc.style.animationPlayState = 'running');
aud.addEventListener('pause', () => disc.style.animationPlayState = 'paused');



mpic.style.animationPlayState = aud.paused ? 'paused' : 'running';
aud.addEventListener('playing', () => mpic.style.animationPlayState = 'running');
aud.addEventListener('pause', () => mpic.style.animationPlayState = 'paused');



btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
aud.addEventListener('seeked', () => calcKey());
aud.addEventListener('timeupdate', () => {
      prog.style.background = 'linear-gradient(90deg, orange, purple ' + aud.currentTime / aud.duration * 100 + '%, snow 0)';
      prog.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
      for (j = 0; j < lrcAr.length; j++) {
                if (aud.currentTime >= lrcAr) {
                        if (mKey === j) showLrc(lrcAr);
                        else continue;
                }
      }
});
let mState = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none', lrc2.style.animationPlayState = 'paused') : (btnplay.style.display = 'none',

btnpause.style.display = 'block', lrc2.style.animationPlayState = 'running');
let showLrc = (time) => {
      lrc2.style.animation = (mFlag ? 'mov1 ' : 'mov2 ') + time + 's linear forwards';
      lrc1.innerHTML = lrc2.innerHTML = lrcAr;
      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 mtime = lrcAr - (aud.currentTime - lrcAr);
      showLrc(mtime);
};
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;
};
</script>

红影 发表于 2023-4-11 14:13

好听的评弹,用的视频挺漂亮,视频logo要是没有就更好了{:4_187:}

有声有色 发表于 2023-4-11 14:55

红影 发表于 2023-4-11 14:13
好听的评弹,用的视频挺漂亮,视频logo要是没有就更好了

我老是偷懒,哈哈

起个网名好难 发表于 2023-4-11 18:21

欣赏美帖!

<img id="mpic" alt="" src="" />
这句删去或许会好些。

红影 发表于 2023-4-11 19:40

有声有色 发表于 2023-4-11 14:55
我老是偷懒,哈哈

这帖子里有好多线条不知道是什么?

有声有色 发表于 2023-4-12 08:51

起个网名好难 发表于 2023-4-11 18:21
欣赏美帖!




谢谢 我删了效果很好,高手就是高手,望今后多指教谢谢了

有声有色 发表于 2023-4-12 08:53

红影 发表于 2023-4-11 19:40
这帖子里有好多线条不知道是什么?

刚才起个网名好难老师给我指出了问题所在,我修改了现在没了

有声有色 发表于 2023-4-12 08:58

有声有色 发表于 2023-4-11 14:55
我老是偷懒,哈哈

好像歌词出不来了

红影 发表于 2023-4-12 21:55

有声有色 发表于 2023-4-12 08:53
刚才起个网名好难老师给我指出了问题所在,我修改了现在没了

是的,现在那些线条没有了呢{:4_204:}

熊二 发表于 2023-4-15 13:04


好听的评弹!在苏州听过,虽然听不懂,感觉很有味道,谢谢朋友分享!

{:4_204:}{:4_199:}

有声有色 发表于 2023-4-18 09:10

熊二 发表于 2023-4-15 13:04
好听的评弹!在苏州听过,虽然听不懂,感觉很有味道,谢谢朋友分享!

谢谢。回复晚了不好意思。
页: [1]
查看完整版本: 评弹——琴调