执著 发表于 2024-3-2 22:29

复制马黑黑老师的《千灯展卷》

<style>
    #papa { margin: 0 0 0 calc(50% - 621px); display: grid; place-items: center; width: 1080px; height: 683px; background: url('https://638183.freep.cn/638183/t24/1/bbce.jpeg') no-repeat center/cover, radial-gradient(black, rgba(0,150,150,.2)); background-blend-mode: screen; box-shadow: 3px 3px 20px #000; overflow: hidden; position: relative; z-index: 1; }
    #lrc { position: absolute; top: 10px; font: bold 2.4em sans-serif; color: gray; text-shadow: 1px 1px 1px rgba(250,250,250,.45); --ani: lrcGo1; --duration: 1s; }
    #lrc::before { position: absolute; content: attr(data-lrc); width: 100%; height: 100%; color: transparent; background: repeating-radial-gradient(circle, orange, snow 28px); background-clip: text; -webkit-background-clip: text; clip-path: inset(0 100% 0 0); animation: var(--ani) var(--duration) linear forwards var(--state); border-bottom: 2px dotted gray; }
    #mplayer { position: absolute; bottom: 10px; text-align: center; color: lightblue; }
    #mplayer::before { position: absolute; content: attr(data-tt); left: 0; bottom: 25px; width: 100%; text-align-last: justify; }
    #mprog { width: 280px; accent-color: orange; outline: none; cursor: pointer; opacity: .7; }
    #mprog:focus { accent-color: gold; }
    #btnplay { width: 50px; height: 50px; cursor: pointer; animation: rotating 6s infinite linear var(--state); }
    #btnplay:hover { filter: invert(.2); }
    li-zi { position: absolute; background: url('https://638183.freep.cn/638183/t23/btn/y5j.png') no-repeat center/cover; offset-path: path('M0 400 Q570 -260 1140 400'); offset-distance: 0; animation: move 10s linear infinite var(--state), rotating 5s infinite var(--state); }
    @keyframes rotating { to { transform: rotate(360deg); } }
    @keyframes lrcGo0 { to { clip-path: inset(0 0 0 0); } }
    @keyframes lrcGo1 { to { clip-path: inset(0 0 0 0); } }
    @keyframes move { to { offset-distance: 100%; } }
</style>

<div id="papa">
    <audio src="https://link.hhtjim.com/163/177893.mp3"></audio>
    <div id="mplayer" data-tt="0:00 0:00">
      <img id="btnplay" src="https://638183.freep.cn/638183/t23/btn/y5j.png" alt="" /><br>
      <input id="mprog" type="range" min="0" max="100" step="any" value="0" title="调节进度"    />
    </div>
    <div id="lrc" data-lrc="HuaChao LRC">HuaChao LRC</div>
</div>

<script>
var geci = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
var sF = document.createElement('script');
sF.charset = 'utf-8';
sF.src = 'https://638183.freep.cn/638183/web/js/rangelrc2024-01.js';
document.querySelector('body').appendChild(sF);
sF.onload = () => {
    Array.from({length: all=40}).forEach(star => {
      var size = 30 + Math.floor(Math.random() * 30);
      star = document.createElement('li-zi');
      star.style.cssText += `
            left: 0;
            top: ${Math.random() * 140 + 60}px;
            width: ${size}px;
            height: ${size}px;
            opacity: ${Math.random() * 0.4 + 0.4};
            animation-delay: -${Math.random() * 10}s, -${Math.random() * 5}s;
      `;
      papa.prepend(star);
    });
};
</script>



红影 发表于 2024-3-3 09:32

这样开始学习也挺好的,边做边理解体会,是学习的路径之一。
歌词同步做得不错的,执著加油{:4_187:}

执著 发表于 2024-3-3 16:36

谢谢老师谬赞!万里长征才迈出了第一步!
页: [1]
查看完整版本: 复制马黑黑老师的《千灯展卷》