zlpi@163.com 发表于 2024-2-19 16:44:51

是不是我不够温柔

本帖最后由 zlpi@163.com 于 2024-11-4 07:39 编辑 <br /><br /><style>
#papa { margin: 0 0 0 calc(50% - 681px);; display: grid; place-items: center; width: 1200px; height: 700px; background: gray url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/1.19.jpg') no-repeat center/cover; box-shadow: 8px 4px 20px #000; overflow: hidden; user-select: none; position: relative; perspective: 3000px; perspective-origin: 50% 15%; z-index: 1; overflow: hidden; }
.vid { position: absolute; width: 1200px; height: 630px; clip-path: circle(66% at top) ;top: -55px; right:0px; object-fit: cover; opacity: .4;mix-blend-mode: screen;}
#papa::before { position: absolute;content: ''; bottom: 0px; width: 1000px; height: 640px; background: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/h5/tp/udi.gif') no-repeat center/cover; border-radius: 100%; transform-style: preserve-3d; transform: rotateY(180deg) rotateZ(-0deg); pointer-events: none; box-shadow: 0px 0px 0px #222; }
.ipic { position: absolute; bottom: 0;transform: skew(-3deg);transform-origin: 0% 0%;}
.ipic:nth-of-type(1) { left: 10px;    top: 10px;animation: skew1 3sinfinite linear;width: 300px; height: 280px;}
.ipic:nth-of-type(2) { left: 650px;    top: 15px; animation: skew2 6sinfinite linear; width: 250px; height: 420px; }
.ipic:nth-of-type(3) { left: 860px;    top: 15px;animation: skew3 3sinfinite linear;width: 155px; height: 220px;}

.stop .ipic:nth-of-type(1){animation-play-state: paused;}
.stop .ipic:nth-of-type(2){animation-play-state: paused;}
.stop .ipic:nth-of-type(3){animation-play-state: paused;}

@keyframes skew1 { 50%{ transform: skew(3deg); } }
@keyframes skew2 { 50%{ transform: skew(3deg); } }
@keyframes skew3 { 50%{ transform: skew(3deg); } }

   
</style>
<div id="papa"></div>
<divclass="items "style="text-align: center;position: absolute;top:740px; left:0px;z-index: 1;"><divid="lrcArea"></div>
<canvas id="canv" width="1200" height="700"></canvas>
<audio id="aud" src="https://aod.cos.tx.xmcdn.com/storages/1fb4-audiofreehighqps/8E/F9/GKwRINsKmIz-ABe4jwMCP19m.m4a" loop="loop" autoplay="autoplay"crossOrigin="anonymous"></audio> 

<img class="ipic" src="https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/zuz.png" alt="" />
      <img class="ipic" src="https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/zuz.png" alt="" />
      <img class="ipic" src="https://pic.imgdb.cn/item/65b76370871b83018a9bd85f.png" alt="" />
<p class="Mid"><img class="mypic" src="" alt="">
</p>

<script >
(function() {
        (function(mkPlayer) {let defaults = {lrcAr: [,],ttAr: ['花潮', '论坛', 'LRC', '在线','HCP','Player'],lrc_css: 'top: 0px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: calc(50% - 50px);',playerCode: `<style>#mplayer {--bg1: tan;--bg2: tan;--bg3: tan;--bg4: tan;--bg5: tan;--bg6: tan;--bg7: tan;--bg8: tan;--border: 1px dotted orange;position: absolute;width: 120px;height: 80px;cursor: pointer;transform-style: preserve-3d;animation: rot 16s linear infinite;animation-play-state: paused;display: grid;place-items: center; }#mplayer > span {width: 100%;height: 100%;border: var(--border);display: grid;place-items: center;font: norml 1.5em sans-serif;position: absolute;}#btnMsg {--btnColor: white;--btnBg: #0089f0;position: absolute;top:120px; left: calc(50% - 76px); color: var(--btnColor);background: var(--btnBg);opacity: 0;border: 2px solid var(--btnColor);border-radius: 8px;padding: 4px;transition: all .75s;cursor: pointer;z-index: 901;}#lrc {--motion: cover2;--tt: 1s;--state: running;--bg: linear-gradient(180deg, hsla(00, 100%, 90%, .95), hsla(0, 100%, 50%, .65));position: absolute;font: bold 2.4em sans-serif;color: hsl(100, 100%, 90%);white-space: pre;-webkit-background-clip: text;filter: drop-shadow(1px 1px 2px hsla(0, 100%, 0%, .85));z-index: 900;}#lrc::before {position: absolute;content: attr(data-lrc);width: 20%;height: 100%;color: transparent;overflow: hidden;white-space: pre;background: var(--bg);filter: inherit;-webkit-background-clip: text;animation: var(--motion) var(--tt) linear forwards;animation-play-state: var(--state);}@keyframes rot { to {transform: rotateY(-360deg); } }@keyframes cover1 { from { width: 0; } to { width: 100%; } }@keyframes cover2 { from { width: 0; } to { width: 100%; } }</style><div id="lrc"data-lrc="是不是因为我不够温柔">是不是因为我不够温柔</div><div id="mplayer"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><span id="btnMsg">停止播放</span>`,};let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;lrc.style.cssText += data.lrc_css;btnMsg.style.cssText += data.btn_css;let mKey = 0,mFlag = true,fs = false,tnow = Date.now(),timerId;let sps = mplayer.children;let width = mplayer.offsetWidth, angle = 45;let trz = Math.ceil(Math.tan(Math.PI / 180 * (198- angle) /2 ) * width / 2);Array.from(sps).forEach( (item,key) => {let ry = Math.floor(key*45);sps.style.transform = `rotateY(${ry}deg) translateZ(${trz}px)`;sps.style.background = `var(--bg${key+1})`;sps.innerText = data.ttAr;});mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();btnMsg.onclick = () => fs ? document.exitFullscreen() : papa.requestFullscreen();papa.onmousemove = (e) => {clearTimeout(timerId);btnMsg.style.opacity = '.95';timerId = setTimeout('btnMsg.style.opacity = "0"', 3000);};document.addEventListener("fullscreenchange", () => {if (document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());let mState = () => aud.paused ? (lrc.style.setProperty('--state', 'paused'), mplayer.style.animationPlayState = 'paused') : (lrc.style.setProperty('--state', 'running'), mplayer.style.animationPlayState = 'running');aud.addEventListener('timeupdate', () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {if (mKey === j) showLrc(data.lrcAr);else continue;}}});let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = data.lrcAr;lrc.dataset.lrc = data.lrcAr.replace(/<br>/, '\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};let calcKey = () => {for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime <= data.lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey > data.lrcAr.length - 1) mKey = data.lrcAr.length - 1;let time = data.lrcAr - (aud.currentTime - data.lrcAr);showLrc(time);};};mkPlayer.HCPlayer = playCode;})(this);
      let lrcAr = [,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ];
       HCPlayer({
                lrcAr: lrcAr,
                lrc_css:`
                       --bg: linear-gradient(hsla(0,100%,55%,.99),hsla(350,100%,50%,.99));
                        bottom: 620px;
                        color: snow;
                `,
                ttAr: ['','','','','','','',''],
                player_css: `
                        --bg1: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/1.png') no-repeat center/cover;
                        --bg2: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/2.png') no-repeat center/cover;
                        --bg3: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/3.png') no-repeat center/cover;
                        --bg4: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/4.png') no-repeat center/cover;
                        --bg5: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/5.png') no-repeat center/cover;
                        --bg6: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/6.png') no-repeat center/cover;
                        --bg7: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/7.png') no-repeat center/cover;
                        --bg8: url('https://ln2018.oss-cn-hangzhou.aliyuncs.com/2024/tp/8t/2.png') no-repeat center/cover;
                        --border: 1px dotted olive;
                        width: 120px;
                        height: 50px;
                        top: 400px;
                `,
   
                btn_css: '--btnColor: white; --btnBg: transparent;',
        });
})();
</script>

<script>

(function () {

        let Act = new AudioContext();

        let audSrc = Act.createMediaElementSource(aud);

        let analyser = Act.createAnalyser();

        audSrc.connect(analyser);

        analyser.connect(Act.destination);

        let ctx = canv.getContext('2d');

        let width = canv.width;

        let height = canv.height;

        let ppColor = ctx.createLinearGradient(2, 10, 4, 25);

        ppColor.addColorStop(0.8, '#0f0');
      ppColor.addColorStop(0.4, '#ff0');
      ppColor.addColorStop(0.2, '#f00')

        let ppNum = 32;

        let voiceHeight = new Uint8Array(analyser.frequencyBinCount);

(function draw() {

                analyser.getByteFrequencyData(voiceHeight);

                let step = Math.round(voiceHeight.length / ppNum);

                ctx.clearRect(0, 0, width, height);

                for (let j = 0; j < ppNum; j++) {

                        let audiheighteight = voiceHeight;

                        ctx.fillStyle = ppColor;

                        ctx.fillRect(width / 2+ (j * 14), height, 8, -audiheighteight);

                        ctx.fillRect(width / 2- (j * 14), height, 8, -audiheighteight);

                }

                window.requestAnimationFrame(draw);

        })();

        canv.onclick = () => aud.paused ? aud.play() : aud.pause();

})();
       
</script>

1643091610 发表于 2024-2-24 09:47:29

这个作品漂亮!!!!

顶不顶个球 发表于 2024-2-25 23:04:36

这个作品漂亮!!!!

活跃概况 发表于 2024-2-28 20:42:00

这个作品漂亮!!!!

翁奕童苑 发表于 2024-3-6 10:19:56

这个作品漂亮!!!!

1643091610 发表于 2024-3-9 01:44:58

这个作品漂亮!!!!

红尘过客 发表于 2024-3-10 10:13:30

这个作品漂亮!!!!

落寞 发表于 2024-3-11 10:12:13

这个作品漂亮!!!!

翁奕童苑 发表于 2024-3-13 05:30:58

这个作品漂亮!!!!

快播 发表于 2024-3-20 02:17:31

这个作品漂亮!!!!
页: [1] 2 3
查看完整版本: 是不是我不够温柔