福宝 发表于 2024-7-1 11:43

传奇


<style>#papa {
        margin: 130px 0 30px calc(50% - 690px);
        width: 1200px;
        height: 1700px;
        background: tan url('https://gd-hbimg.huaban.com/a88824f49b2117c05af77e0aeacd88dd74f2d85d43d0c-XuTMVc')no-repeat center / cover; ;
        box-shadow: 0 0 8px #000;
        display: grid;
        place-items: center;
        position: relative;
        overflow: hidden;
        --state: paused;
}

#papa::after{
    position: absolute;
    left: 520px;
        bottom: 200px;
        content: url('http://qslt.net/static/image/smiley/datu/srkl2.gif');
        z-index: 3;}

#vid {
        position: absolute;
        width: 1400px;
        height: 100%;
        border-radius: 2%;
        opacity: .66;
        object-fit: cover;
        pointer-events: none;
        mix-blend-mode: screen;
        transform: rotateX(180deg);
}       
.xiewen {/* 斜纹文本 */
        position: absolute;
      width: 800px;
      height: 200px;
      top:1100px;
      line-height: 200px;
      font-family: '微软雅黑', '宋体';
      font-size: 6rem;
      font-weight: 900;
      text-align: center;
      background: LightPink linear-gradient(45deg, transparent 45%, #FF69B4 45%, #FF69B4 55%, transparent 0);
      background-size: 4px 4px;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      -webkit-text-stroke: 2px #111;
}
css-doodle { position: absolute;;}

</style>


<div id="papa">

<!-- 播放器 -->
<css-doodle grid="5x5" >
    :doodle {
      @size: 150vw 150vmin;
      perspective: 10px;
    }
    :container {
      perspective: 50px;
      transform-style: preserve-3d;
    }
    position: absolute;
    top: 0px;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    background: hsl(@rn(1, 255, 3), @rn(50%, 90%), @rn(50%, 90%));
    transform: scale(@rn(1, 10, 3)) translate3d(@rn(-50, 50, 3)vw, @rn(-50, 50, 3)vh, @rn(-100, 20)px);
    animation: move @rn(5, 15, 3)s infinite @rn(-20, -10, 3)s linear alternate;
    box-shadow: 0 0 1px #fff, 0 0 5px #fff;
    @keyframes move {
      100% {
            margin-top: 500px;
      }
    }
</css-doodle>

<css-doodle grid="3" id="mplayer">
:doodle {
@size: 200px;
cursor: pointer;
right: 500px;
top: 1300px;
opacity: .96;
z-index: 4;
}

clip-path: @shape(frame:4;points:40;x: cos(12t)^1 * cos(15t);y: cos(12t)^1 * sin(15t););
background: linear-gradient(HotPink,LavenderBlush,Snow);

animation: rot 6s infinite linear var(--state);
@keyframes rot { to { transform: rotate(360deg); } }
</css-doodle>


<!-- 弧 -->
<css-doodle grid="6x1">:doodle {
@size: 1200px 1700px; margin: 20px auto; }

@size: 65px;
position: absolute;
background: linear-gradient(Snow,HotPink,LavenderBlush);
clip-path: @shape(frame: 8;points: 40;x: cos(12t)^1 * cos(15t);y: cos(12t)^1 * sin(15t););
border-radius: 50%;cursor: pointer;
offset-path: path('M900 900 A100 100 0 1 0 300 450');
offset-distance: calc((@i - 1) * 20%);
animation: rot 6s infinite linear var(--state);
@keyframes rot { to { transform: rotate(360deg); } }

</css-doodle>

<!-- 歌词 -->
<css-doodle id="lrc">:doodle {
@size: auto 4em;
z-index:5;
bottom: 60px;
left: 50%;
transform: translate(-50%);
--geci: &quot;
css-doodle player&quot;;
--motion: cover2; --tt: 1s; }

display: grid;
place-items: center start;
:before, :after {content: var(--geci);color: Pink;font: bold 2em sans-serif;text-shadow: 1px 1px 2px #000;white-space: pre;}
:after {position: absolute;
width: 0;
color:LavenderBlush;
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>


<video id="vid" src="https://img.tukuppt.com/video_show/2916847/00/17/74/5ecdddf687cca.mp4" autoplay="" loop="" muted=""></video>       
<div class="xiewen">巨蟹座生日快乐!</div>
   <audio id="aud" src="http://www.kumeiwp.com/sub/filestores/2023/04/03/cad5f04c9a8ee1bc34ea47b2436e3509.mp3" autoplay="autoplay" loop="loop"></audio></div><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 script = document.createElement('script');
script.src = 'https://638183.freep.cn/638183/web/api/css-doodle.js';
document.body.appendChild(script);

//let mState = () => papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');
let mState = () => aud.paused ? (papa.style.setProperty('--state','paused'), vid.pause()) : (papa.style.setProperty('--state','running'), vid.play());
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.onclick = () => aud.paused ? aud.play() : aud.pause();</script>

蜻蜓 发表于 2024-7-1 21:09

很浪漫{:10_402:}
页: [1]
查看完整版本: 传奇