焱鑫磊 发表于 2023-8-27 01:58

《万泉河水清又清》刘紫玲

本帖最后由 焱鑫磊 于 2023-8-27 02:43 编辑 <br /><br /><style>
#papa{margin: 100px -300px ; width: 1200px;height:675px;background: tan url('https://pic.imgdb.cn/item/64ea4445661c6c8e545c6ff9.jpg');box-shadow: 0 0 8px #000;display: grid;place-items: center;position: relative;--state: paused;}
    css-doodle{position: absolute;}</style>      <div id="papa">    <css-doodle grid="30" id="mplayer">            :doodle {                  @size: 1200px 675px;                  box-shadow: 0 0 8px #000;                  position: relative;                  z-index: 1;                           }            @match(i ≤ @size - 2) {                  @size: @r(1,2)px @r(10,60)px;                  @place: @r(0,1200)px -100px;                  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.3));                  animation: fall @r(.5,1.5)s @r(-4,0)s infinite linear var(--state);            }            @nth(@size - 1, @size) {                  @size: 80px;                  @place:330px 250px;                  clip-path: @shape(fill: evenodd;points: 300;scale: .45;x: cos(2t) + cos(π - 7t);y: sin(2t) + sin(7t);                  );                  background: Lavender;                  cursor: pointer;                  animation: rot 4s infinite linear var(--state);            }            @nth(@size) { @place:838px 250px; }            @keyframes fall { to { transform: translateY(783px); } }            @keyframes rot { to { transform: rotate(360deg); } }    </css-doodle><css-doodle id="lrc">                  :doodle {                            @size: auto 4em;                            bottom: 40px;                            --geci: &quot;css-doodle player&quot;; --motion: cover2; --tt: 1s;                  }                  /* 单元格两个伪元素显示lrc歌词 */                  display: grid;                  place-items: center start;                  :before, :after {                            content: var(--geci);                            color:                LightGrey; /* 歌词底色 */                            font: bold 2em sans-serif;                            text-shadow: 1px 1px 2px #000;                            white-space: pre;                     }                  :after {                            position: absolute;                            width: 0;                            color: DarkSeaGreen; /* 同步歌词颜色 */                            overflow: hidden;                            animation: var(--motion) var(--tt) linear forwards var(--state);                  }                  @keyframes cover1 { from { width: 0; } to { width: 100%; } }                  @keyframes cover2 { from { width: 0; } to { width: 100%; } }      </css-doodle><audio id="aud" src="https://i.mp3.wf/view.php/bfb9e86b7b24565a384706f35f29a9f6.mp3" autoplay="" loop=""></audio></div>    <script>(function() {
            let script = document.createElement('script');
            script.src = 'https://unpkg.com/css-doodle@0.34.9/css-doodle.min.js';
            document.head.appendChild(script);
            let slip = 0.5, mFlag = true, mKey = 0, clickIdx = 0, progChg = 0, cursors = ['default','pointer','pointer'];
let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
            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 mState = () => papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');
            let showLrc = (time) => {lrc.style.setProperty('--motion', mFlag ? 'cover1' : 'cover2');lrc.style.setProperty('--geci', '"' + lrcAr + '"');lrc.style.setProperty('--tt', time + 's');mKey += 1;mFlag = !mFlag;};
            aud.addEventListener('play', mState, false);
            aud.addEventListener('pause', mState, false);
            aud.addEventListener('timeupdate', () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime - slip >= lrcAr) {cKey = j;if (mKey === j) showLrc(lrcAr);else continue;}}mplayer.style.setProperty('--ttmsg1', `'${toMin(aud.currentTime)}'`);mplayer.style.setProperty('--ttmsg2', `'${toMin(aud.duration)}'`);mplayer.style.setProperty('--prog',`${100 * aud.currentTime / aud.duration}%`);});
            mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();
    })();</script>

红影 发表于 2023-8-27 07:28

这个场景真开阔。很漂亮的制作,欣赏焱鑫磊好帖{:4_187:}

红影 发表于 2023-8-27 07:29

焱鑫磊又是那么晚呢,太辛苦了{:4_184:}

梦油 发表于 2023-8-27 08:31

欣赏美曲,问候鑫磊。

焱鑫磊 发表于 2023-8-27 10:31

红影 发表于 2023-8-27 07:28
这个场景真开阔。很漂亮的制作,欣赏焱鑫磊好帖

问好红影!{:4_187:}

焱鑫磊 发表于 2023-8-27 10:31

红影 发表于 2023-8-27 07:29
焱鑫磊又是那么晚呢,太辛苦了

上网有瘾呢!{:4_181:}

焱鑫磊 发表于 2023-8-27 10:32

梦油 发表于 2023-8-27 08:31
欣赏美曲,问候鑫磊。

问好梦油!{:4_204:}

梦油 发表于 2023-8-27 10:45

焱鑫磊 发表于 2023-8-27 10:32
问好梦油!

鑫磊朋友别客气。

红影 发表于 2023-8-27 12:49

焱鑫磊 发表于 2023-8-27 10:31
问好红影!

问好焱鑫磊,周日快乐{:4_187:}

红影 发表于 2023-8-27 12:49

焱鑫磊 发表于 2023-8-27 10:31
上网有瘾呢!

瘾头上来就努力做出来,焱鑫磊非常认真的呢{:4_187:}
页: [1]
查看完整版本: 《万泉河水清又清》刘紫玲