马黑黑 发表于 2023-10-6 10:28

滚滚长江东逝水

本帖最后由 马黑黑 于 2023-10-6 10:46 编辑 <br /><br /><style>
#papa { margin: -80px 0 0 calc(50% - 593px); width: 1024px; height: 640px; background: url('https://file.uhsea.com/2310/d6a8d80e63f94699c69b296e45dafca1CF.jpg') no-repeat center/cover; box-shadow: 4px 4px 8px black; overflow: hidden; display: grid; place-items: center; z-index: 1; position: relative; --state: running; }
#papa::before, #papa::after { position: absolute; content: url('https://file.uhsea.com/2310/5e73a209c889ccc1a38440e006beff45ZJ.gif'); top: 0; mix-blend-mode: screen; opacity: .75; }
#papa::after { top: calc(100% - 188px); opacity: .25; }
</style>

<div id="papa">
        <audio id="aud" src="https://file.uhsea.com/2310/89e20b56d339cf95386329404fe55ef9DL.mp3" autoplay loop></audio>
</div>

<script>

(function() {
        let lrcAr = [ , , , , , , , , , , , , , ];
        let js1 = 'https://638183.freep.cn/638183/web/api/svg_path_lrc.js',
                js2 = 'https://638183.freep.cn/638183/web/lizi/h5lz_2d.js';
        let loadJs = (url,callback) => {
                let body = document.querySelector('body'), jsNode = document.createElement('script');
                jsNode.charset = 'utf-8';
                jsNode.setAttribute('src', url);
                body.appendChild(jsNode);
                jsNode.onload = () => callback();
        };
        loadJs(js1, () => {
                HCPlayer({
                        papa: '#papa',
                        lrcAr: lrcAr,
                        lrc_css: 'bottom: 20px;',
                        fs_css: 'transform: translate(0,-35px); background: transparent;',
                        player_css: 'width: 200px; height: 100px; bottom: 70px; filter: hue-rotate(90deg);',
                        path: 'M5 50 L10 45 Q35 80 50 50 T100 70 T160 70 T 195 65',
                        btn: {left: 64, top: 0},
                        track: {track: 'olive', prog: 'darkred'},
                        img: {play: '', pause: ''}
                });
        });

        loadJs(js2, () => {
                H5lz({
                        papa: '#papa',
                        total: 25,
                        size: {width: 18, height: 18},
                        shape: {background: 'url("https://file.uhsea.com/2310/43504e3a64e8c4097e61d90b8ec49e02L3.png") no-repeat center/cover', borderRadius: ''},
                        ani: 'toBottom',
                        maxTime: 30,
                        offset: {x: 0, y: 0},
                });
        });
})();

</script>

马黑黑 发表于 2023-10-6 10:28

本帖最后由 马黑黑 于 2023-10-6 10:47 编辑 <br /><br /><style>
        .papa {}
        .papa > p {margin: 8px 0;}
        .mama {height: fit-content; display: grid; grid-template-columns: 50px auto; grid-template-rows: 1fr; padding: 0; margin: 20px 0; background: #f9f9f9; box-shadow: 0 0 2px #000; position: relative;}
        .hCode, .hLineNum {margin: 0;padding: 10px 4px;width: 100%;box-sizing: border-box;font-size: 14px;line-height: 16px;}
        .hCode {overflow-x: auto; tab-size: 3;}
        .hLineNum {border-right: 1px solid #ccc;text-align: right;color: gray;user-select: none;}
        .stage {display: grid; place-items: center;}
</style>

<div class="papa">
        <p>帖子代码:</p>
        <div class="mama">
                <pre class="hLineNum"></pre>
                <pre class="hCode">&lt;style&gt;
#papa { margin: 0 0 0 calc(50% - 593px); width: 1024px; height: 640px; background: url('https://file.uhsea.com/2310/d6a8d80e63f94699c69b296e45dafca1CF.jpg') no-repeat center/cover; box-shadow: 4px 4px 8px black; overflow: hidden; display: grid; place-items: center; z-index: 1; position: relative; --state: running; }
#papa::before, #papa::after { position: absolute; content: url('https://file.uhsea.com/2310/5e73a209c889ccc1a38440e006beff45ZJ.gif'); top: 0; mix-blend-mode: screen; opacity: .75; }
#papa::after { top: calc(100% - 188px); opacity: .25; }
&lt;/style&gt;

&lt;div id="papa"&gt;
        &lt;audio id="aud" src="https://file.uhsea.com/2310/89e20b56d339cf95386329404fe55ef9DL.mp3" autoplay loop&gt;&lt;/audio&gt;
&lt;/div&gt;

&lt;script&gt;

(function() {
        let lrcAr = [ , , , , , , , , , , , , , ];
        let js1 = 'https://638183.freep.cn/638183/web/api/svg_path_lrc.js',
                js2 = 'https://638183.freep.cn/638183/web/lizi/h5lz_2d.js';
        let loadJs = (url,callback) =&gt; {
                let body = document.querySelector('body'), jsNode = document.createElement('script');
                jsNode.charset = 'utf-8';
                jsNode.setAttribute('src', url);
                body.appendChild(jsNode);
                jsNode.onload = () =&gt; callback();
        };
        loadJs(js1, () =&gt; {
                HCPlayer({
                        papa: '#papa',
                        lrcAr: lrcAr,
                        lrc_css: 'bottom: 20px;',
                        fs_css: 'transform: translate(0,-35px); background: transparent;',
                        player_css: 'width: 200px; height: 100px; bottom: 70px; filter: hue-rotate(90deg);',
                        path: 'M5 50 L10 45 Q35 80 50 50 T100 70 T160 70 T 195 65',
                        btn: {left: 64, top: 0},
                        track: {track: 'olive', prog: 'darkred'},
                        img: {play: '', pause: ''}
                });
        });

        loadJs(js2, () =&gt; {
                H5lz({
                        papa: '#papa',
                        total: 25,
                        size: {width: 18, height: 18},
                        shape: {background: 'url("https://file.uhsea.com/2310/43504e3a64e8c4097e61d90b8ec49e02L3.png") no-repeat center/cover', borderRadius: ''},
                        ani: 'toBottom',
                        maxTime: 30,
                        offset: {x: 0, y: 0},
                });
        });
})();

&lt;/script&gt;</pre>
        </div>
        <p>【说明】player_css 配置中,filter: hue-rotate(90deg); 这一句,作用是转换色相,将播放器各元素的颜色都做了调整。</p>
</div>

<script>
let hCodes = document.querySelectorAll('.hCode'),
        hLineNums = document.querySelectorAll('.hLineNum');

hCodes.forEach((item,key) => {
        let lines = hCodes.innerText.trim().split('\n').length;
        let str = '';
        for(i = 0; i < lines; i ++) {
                str += i + 1 + '\n';
        }
        hLineNums.innerText = str;
});
</script>

梦油 发表于 2023-10-6 11:10

青山绿水、 重峦叠嶂、水秀山明、江山如画,太美了,太美了。

醉美水芙蓉 发表于 2023-10-6 11:46

红影 发表于 2023-10-6 11:56

用路径来模拟波浪,这设想真棒{:4_187:}

红影 发表于 2023-10-6 12:00

还弄了带倒影的闪光和飘飞的落叶,背景选择的风景真美{:4_204:}

红影 发表于 2023-10-6 12:02

哦,前面没看仔细,不是倒影呢,是下面那个加了透明度{:4_173:}

马黑黑 发表于 2023-10-6 12:09

红影 发表于 2023-10-6 12:02
哦,前面没看仔细,不是倒影呢,是下面那个加了透明度

模拟倒影的方法很多的

马黑黑 发表于 2023-10-6 12:09

醉美水芙蓉 发表于 2023-10-6 11:46
欣赏老师新作品!太霸气了!

{:4_190:}

马黑黑 发表于 2023-10-6 12:10

红影 发表于 2023-10-6 12:00
还弄了带倒影的闪光和飘飞的落叶,背景选择的风景真美

长江很美的

马黑黑 发表于 2023-10-6 12:10

红影 发表于 2023-10-6 11:56
用路径来模拟波浪,这设想真棒

其实它大概是长江的主干走势图,不精准,大概弄一下

红影 发表于 2023-10-6 14:03

马黑黑 发表于 2023-10-6 12:09
模拟倒影的方法很多的

是的,这种好方法,不挑播放器。

红影 发表于 2023-10-6 14:04

马黑黑 发表于 2023-10-6 12:10
长江很美的

那是当然,它是炎黄子孙的母亲河啊。

红影 发表于 2023-10-6 14:05

马黑黑 发表于 2023-10-6 12:10
其实它大概是长江的主干走势图,不精准,大概弄一下

不管怎么说,这个主题都适合曲线的,这个走势也挺像啊。{:4_187:}

小文 发表于 2023-10-6 16:09

欣赏{:4_187:}

冬天的雨 发表于 2023-10-6 18:15

画面真美,现在的新农村都是山青水秀了,美极了

冬天的雨 发表于 2023-10-6 18:17

杨洪基的演唱也是高八度的,声音洪亮,有气势{:4_178:}

冬天的雨 发表于 2023-10-6 18:17

欣赏马老师的新分享{:4_199:}

小辣椒 发表于 2023-10-6 20:29

这个转换色相前面有看见分享了,但不知道怎么用,黑黑一步步深入分解了,小辣椒就等你做好直接套用了{:4_170:}

千羽 发表于 2023-10-6 21:19

风景好美啊,那个金光闪闪的小太阳和飘落的片叶都是大亮点,播放器和伴侣也是美美达{:4_187:}
页: [1] 2
查看完整版本: 滚滚长江东逝水