亦是金 发表于 2023-5-12 11:09

红影 发表于 2023-5-12 11:04
艾特好了以后,有细线显示,表明已经发送给对方了

谢谢红影详细介绍!{:4_187:}

亦是金 发表于 2023-5-12 11:12

红影 发表于 2023-5-12 11:05
亦是金老师每次做帖子都有自己的修改,很棒的

哈哈哈,总想夹带一点私货!{:5_111:}

起个网名好难 发表于 2023-5-12 11:36

亦是金 发表于 2023-5-12 09:18
问好老师!谢谢老师点评!我想在帖子里加上花朵飞舞效果,反复捣鼓没有成功。请老师指点!谢谢 ...

<css-doodle grid="16">
        :doodle {
                @size: 1000px 667px;
        }
        position: absolute;
        left: -10%;
        top: @r(100)%;
        :after {
                position: absolute;
                content: '@p(♩,♪,♫,♬,♥,❉,✿,❀,☸)';
                color:pink;
                font-size: @r(10, 40)px;
        }
        animation: fall @r(6,20)s @r(-6, 6)s infinite;
        @keyframes fall {
                0% { left: -20%; transform: rotate(0deg); }
                100% {left: 120%; transform: rotate(@p(360, 720)deg); }
        }
</css-doodle>
把这段代码放在你的<css-doodle> 代码段后面试试看

起个网名好难 发表于 2023-5-12 11:40

本帖最后由 起个网名好难 于 2023-5-12 14:06 编辑 <br /><br /><style>
#lrc { --motion: cover1; --tt: 1s; --state: paused; position: absolute; bottom: 100px; left:30%; font: bold 2.6em sans-serif; color:
#FAEFC0; -webkit-background-clip: text; filter: drop-shadow(1px 1px 2px hsla(0,100%,0%,.85)); width:80%;}
#lrc::before { position: absolute; content: attr(data-lrc); width:100%; height: 100%; color: transparent; overflow: hidden; white-space: nowrap; background: linear-gradient(180deg,hsla(0,100%,50%,.75),hsla(60,100%,50%,.65)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }

@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes circle { from { transform: rotate(0) translate(50px); } to { transform: rotate(360deg) translate(50px); } }

@keyframes yao {
      from{transform: perspective(800px) rotatex(45deg); }
      to { transform: perspective(800px) rotatex(-45deg); }
}

.tit {
        position:absolute;width:800px;height: 30px;top:50px;LEFT: 50px;z-index: 100;text-align:left;
        filter: drop-shadow(-1px 1px 1px #ffffff)drop-shadow(0px -1px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff);
        animation: yao 1.0s linear infinite alternate; font-family:微软简中圆;font-weight: bold;color: #f46ff6;transform-origin: top;margin: auto;}
#tit:hover { color: green; }

#papa {
      margin: auto;
      top: 0px;
      left: 0px;
      width: 1000px;
      height: 667px;
      background: tan url('https://s4.ax1x.com/2022/02/17/H5pStP.jpg');
      box-shadow: 0 0 8px #000;
      display: grid;
      place-items: center;
      position: relative;margin:100px 0 32px -200px;
                box-shadow:0px 0px 1px 2px #045768, 0px 0px 0px 8px #99e5f5,0px 0px 5px 15px #045768;
                overflow:hidden;border-radius:1%;
}
</style>


<div id="papa">
<css-doodle id="mplayer">
:doodle {
      @grid: 2 / 550px 100px;
      position: absolute;
      color: var(--color);
      bottom: 0;
      --prog: 0%;
      --size: 60px;
      --ttmsg1: '00:00';
      --ttmsg2: '00:00';
      --color: #1434f6;
      --state: paused;
                z-index:99;
}
@nth(1) {@place: 35% 100%;:after { content: var(--ttmsg1); }}
@nth(2) {@size: var(--size);@shape: windmill;@place: 50% 35%;background: var(--color);animation: rot 6s infinite linear var(--state);}
@nth(3) {@place: 65% 100%;:after { content: var(--ttmsg2); }}
@nth(4) {@place: 50% 80%;@size: 100% 2px;background: #bbb;display: grid;place-items: center start;:before {content: '';width: var(--prog);height: 100%;background: var(--color);}}
@keyframes rot { to { transform: rotate(1turn); } }
</css-doodle>
<css-doodle grid="16" id="fFloat">
        :doodle {
                @size: 1000px 667px;
                --state:paused;
        }
        position: absolute;
        left: -10%;
        top: @r(100)%;
        :after {
                position: absolute;
                content: '@p(♩,♪,♫,♬,♥,❉,✿,❀,☸)';
                color:pink;
                font-size: @r(10, 40)px;
        }
        animation: fall @r(6,20)s @r(-6, 6)s infinite var(--state);
        @keyframes fall {
                0% { left: -20%; transform: rotate(0deg); }
                100% {left: 120%; transform: rotate(@p(360, 720)deg); }
        }
</css-doodle>

<img src="https://z3.ax1x.com/2021/08/26/hujGMd.gif" style="z-index:88;position:absolute; top: 400px;right:50px;">





<!-- div id="hu" -->
<!--div id="baiBox"-->
<div class="tit">
<span style="color:#fb52f9;font-size:32px;">《 画 里 有 话 》</span>
<span style="color:#3d46f7;font-size:20px;">   - 尹昔眠</span></div>


<span style="position:absolute; right:20px; bottom:20px;color:#ff0000;font-family:华文隶书;font-size:26px;font-weight:bold;
filter: drop-shadow(-1px 1px 1px #e8f552)drop-shadow(0px -1px 1px #e8f552)drop-shadow(0px 0px 1px #e8f552)drop-shadow(0px 0px 1px #e8f552)drop-shadow(0px 0px 1px #e8f552)">亦是金在线音乐 </span>


      <!--div id="mama"><span id="box"></span></div-->

      <span id="btnplay"></span> <!--播放按钮代码-->
      <span id="lrc" data-lrc="花潮论坛lrc在线">花潮论坛lrc在线</span>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=2004667932" autoplay= "autoplay"></audio>

<script>

//let stepX = 1, stepY = 1, moveX= 0, moveY = 0;
(function() {
      let mKey = 0, mFlag = true, slip = 0.1;
let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
];
      aud.loop = false;
      btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
      aud.addEventListener('pause', () => mState());
      aud.addEventListener('play', () => mState());
      aud.addEventListener('ended', () => { mKey = 0; aud.play(); });
      aud.addEventListener('timeupdate', () => {
                for (j = 0; j < lrcAr.length; j++) {
                        if (aud.currentTime - slip >= lrcAr) {
                              if (mKey === j) showLrc(lrcAr);
                              else continue;
                        }
                }
      });
      //let mState = () => aud.paused ? (btnplay.style.animationPlayState = 'paused', lrc.style.setProperty('--state', 'paused')) : (btnplay.style.animationPlayState = 'running', lrc.style.setProperty('--state', 'running'));
      let showLrc = (time) => {
                let name = mFlag ? 'cover1' : 'cover2';
                lrc.innerHTML = lrc.dataset.lrc = lrcAr;
                lrc.style.setProperty('--motion', name);
                lrc.style.setProperty('--tt', time + 's');
                lrc.style.setProperty('--state', 'running');
                mKey += 1;
                mFlag = !mFlag;
      };
})();
(function() {
        let clickIdx = 0, progChg = 0, cursors = ['default','pointer','pointer'];
        let script = document.createElement('script');
        script.src = 'https://unpkg.com/css-doodle@0.34.9/css-doodle.min.js';
        document.head.appendChild(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;};
       
        let mState = () => aud.paused ? (mplayer.style.setProperty('--state', 'paused'), lrc.style.setProperty('--state', 'paused'), fFloat.style.setProperty('--state', 'paused') ) :
                                                                        (mplayer.style.setProperty('--state', 'running'), lrc.style.setProperty('--state', 'running'),fFloat.style.setProperty('--state', 'running'));
                                                                       
        aud.addEventListener('play', mState, false);
        aud.addEventListener('pause', mState, false);
        aud.addEventListener('ended', () => { mKey = 0; aud.play(); });
        aud.addEventListener('timeupdate', () => {
                mplayer.style.setProperty('--ttmsg1', `'${toMin(aud.currentTime)}'`);
                mplayer.style.setProperty('--ttmsg2', `'${toMin(aud.duration-aud.currentTime)}'`);
                mplayer.style.setProperty('--prog',`${100 * aud.currentTime / aud.duration}%`)
   });

        mplayer.onclick = () => {if(clickIdx === 1) aud.paused ? aud.play() : aud.pause();if(clickIdx === 2) aud.currentTime = progChg;}
        mplayer.onmousemove = (e) => {let size = parseInt(window.getComputedStyle(mplayer).getPropertyValue('--size')), ww = mplayer.offsetWidth, hh = mplayer.offsetHeight;clickIdx = e.offsetY > hh/1.5 ? 2 : (e.offsetX > (ww - size)/2 && e.offsetX < (ww + size)/2 && e.offsetY < hh/1.5 ? 1 : 0);mplayer.style.cursor = cursors;if(clickIdx > 1) progChg = aud.duration * e.offsetX / ww;}

})();

</script>

马黑黑 发表于 2023-5-12 11:44

亦是金 发表于 2023-5-12 08:45
@黑黑老师,我想在帖子里加上花朵飞舞效果,反复捣鼓没有成功。请老师指点!谢谢!

你再加一个 css-doodle 标签,注意id不要雷同,同时需要提升播放器的z-index值以免它处于下层

亦是金 发表于 2023-5-12 11:49

起个网名好难 发表于 2023-5-12 11:40
本帖最后由 起个网名好难 于 2023-5-12 11:46 编辑




谢谢老师!我去试试!{:4_190:}

亦是金 发表于 2023-5-12 11:50

马黑黑 发表于 2023-5-12 11:44
你再加一个 css-doodle 标签,注意id不要雷同,同时需要提升播放器的z-index值以免它处于下层

好的!我试试去!谢谢老师!{:4_190:}

醉美水芙蓉 发表于 2023-5-12 11:53

亦是金 发表于 2023-5-12 12:13

醉美水芙蓉 发表于 2023-5-12 11:53
做得漂亮!

问好醉美水芙蓉!谢谢欣赏!{:4_190:}

亚伦影音工作室 发表于 2023-5-12 14:52

好像控制按钮无效,须调整!

亦是金 发表于 2023-5-12 15:31

亚伦影音工作室 发表于 2023-5-12 14:52
好像控制按钮无效,须调整!

问好亚伦!已经调整,现在应该正常了!{:4_190:}

红影 发表于 2023-5-12 16:28

亦是金 发表于 2023-5-12 11:09
谢谢红影详细介绍!

太客气了点,这个就是彼此交流而已啊{:4_173:}

红影 发表于 2023-5-12 16:29

亦是金 发表于 2023-5-12 11:12
哈哈哈,总想夹带一点私货!

这样的尝试很好的{:4_187:}

小文 发表于 2023-5-13 10:30

唯美的图画,欣赏
页: 1 [2]
查看完整版本: 《画里有话》 - 尹昔眠(试帖黑黑老师音频播放控制器应用实例)