醉美水芙蓉 发表于 2022-11-20 21:14

远嫁的你嫁对了吗 (DJ沈念版)

本帖最后由 醉美水芙蓉 于 2022-11-20 21:14 编辑 <br /><br /><style>
#papa {
      margin: 100px 0 0 calc(50% - 681px);
      width: 1200px;
      height: 640px;
      background: #666 url('https://pic.imgdb.cn/item/637a1f8216f2c2beb19d6667.jpg') no-repeat center/cover;
      box-shadow: 3px 3px 20px #000;
      display: grid;
      place-items: center;
      position: relative;

}
.vid { position: absolute; right:-40px; top:0px; width:115%; height: 640px; object-fit: cover; opacity: .4; clip-path: circle(90% at bottom) ;mix-blend-mode: screen;overflow:hidden;}
.numClock {
        margin: auto;top:60px; right:110px;
        width: 10em;
        height: 10em;
        background: rgba(240, 248, 255, .6);
        border: 0.6em solid #2f4f4f;
        border-radius: 50%;
        position: absolute;
}
.numClock::before {
        content: "HUACHAO";
        position: absolute;
        width: 100%;
        font-size: 0.75em;
        text-align: center;
        top: 70%;
}
.numBox {
        position: absolute;
        width: 0.75em;
        height: 0.75em;
        font-family: 'Microsoft Yahei', Sans-Seri;
        font-size: 0.75em;
        left: calc(50% - 0.375em);
        top: calc(50% - 0.375em);
        background: transparent;
        text-align:center;
}
.numBox span { display: inline-block; }
.hHand,.mHand,.sHand { position: absolute; width: 100%; height: 100%; background: transparent;}
.hr-hand, .min-hand,.sec-hand {
        position: absolute;
        bottom: 50%;
        transform-origin: 50% 100%;
}
.hr-hand {
        background: #2f4f4f;
        width: 0.2em;
        height: 30%;
        left: calc(50% - 0.1em);
        animation: tRun 43200s linear infinite;
}
.hr-hand::after {
        content: "";
        position: absolute;
        width: 0; height: 0;
        border: 0.25em solid;
        border-color: transparent transparent #2f4f4f transparent;
        right: -0.15em;
        bottom: 100%;
}
.min-hand {
        background: #2f4f4f;
        width: 0.15em;
        height: 42%;
        left: calc(50% - 0.075em);
        animation: tRun 3600s linear infinite;
}
.sec-hand {
        background: #d00;
        width: 0.1em;
        height: 48%;
        left: calc(50% - 0.05em);
        border-radius: 60% 60% 20% 20%;
        animation: tRun 60s linear infinite;
}
.sec-hand::before {
        content: "";
        position: absolute;
        bottom: -0.15em;
        left: -0.15em;
        width: 0.4em;
        height: 0.4em;
        border-radius: 50%;
        background: red;
}
@keyframes tRun { to { transform: rotate(1turn);} }
</style>

<div id="papa">
<video class="vid" src="https://img.tukuppt.com/video_show/2916847/00/17/74/5ecdddf687cca.mp4" autoplay="autoplay" loop="loop" muted="muted"></video>
<img id="pic" src="" alt="" />
<div class="numClock">
        <div class="hHand">
                <div class="hr-hand"></div>
        </div>
        <div class="mHand">
                <div class="min-hand"></div>
        </div>
        <div class="sHand">
                <div class="sec-hand"></div>
        </div>
</div>
</div>
<audio id="aud" src="https://www.qqmc.com/up/kwlink.php?id=251368285&.mp3" loop autoplay></audio>

<script>
var now = new Date();
var        hr = now.getHours() > 12 ? now.getHours() - 12 : now.getHours(),
        min = now.getMinutes(),
        sec = now.getSeconds(),
        msec = now.getMilliseconds();
var        hDeg = hr * 30 + (min * 6 / 12),
        mDeg = min * 6 + (sec * 6 / 60),
        sDeg = sec * 6 + (msec * 0.36 / 1000);

addNum();
godPush("hHand", hDeg);
godPush("mHand", mDeg);
godPush("sHand", sDeg);

function godPush(ele, deg) {
        document.querySelector("." + ele).style.transform = "rotate(" + deg + "deg)";
}
function addNum() {
        var nStr = "";
        for(j=0;j<12;j++) {
                nStr += "<div class='numBox' style='transform: rotate(" + j*30 + "deg) translateY(-5.8em);'><span style='transform: rotate(-" + j*30 + "deg);'>" + (j == 0 ? "12" : j) + "</span></div>";
        }
        document.querySelector(".numClock").innerHTML = nStr + document.querySelector(".numClock").innerHTML;
}

(function(mkPlayer) {let defaults = {lrcAr: [],lrc_css: 'top: 10px; left: 50%; transform: translateX(-50%);',player_css: 'bottom: 20px; left: 50%; transform: translateX(-50%);',btn_size: '40px',playerCode: `<style>#mplayer {position: absolute;display: grid;grid-template-areas: 'cur btnplay dur''prog prog prog';gap: 2px 6px;place-items: end center;color: var(--color);font: normal 16px sans-serif;z-index: 999;--ww: 260px;--color: hsl(0, 100%, 100%);}#btnplay {grid-area: btnplay;--state: paused;width: 40px;height: 40px;cursor: pointer;display: grid;place-items: center;animation: rot linear 3s infinite;position: relative;animation: rot 3s linear infinite;animation-play-state: var(--state);}#btnplay > span {position: absolute;width: 10px;height: 10px;border-radius: 50%;background: linear-gradient(tan,red);}#prog {grid-area: prog;width: var(--ww);height: 20px;opacity: .95;cursor: pointer;}#cur { grid-area: cur; color: var(--color); }#dur { grid-area: dur; color: var(--color); }#lrc {--motion: cover2;--tt: 2s;--state: paused;--bg: linear-gradient(180deg,hsla(60,100%,50%,.45),hsla(200,50%,50%,.75));position: absolute;left: 20px;top: 10px;font: bold 2.4em sans-serif;color: hsl(0, 10%, 90%);white-space: pre;-webkit-background-clip: text;filter: drop-shadow(1px 1px 2px hsla(0, 0%, 0%, .95));}#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 cover1 { from { width: 0; } to { width: 100%; } }@keyframes cover2 { from { width: 0; } to { width: 100%; } }@keyframes rot { to { transform: rotate(1turn); } }</style><div id="lrc" data-lrc="HCPlayer">HCPlayer</div><div id="mplayer"><div id="cur">00:00</div><div id="btnplay"><span></span></div><div id="dur">00:00</div><meter id="prog" max="100" low="25" high="75" optimum="85" value="0"></meter></div>`,};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;btnplay.style.width = btnplay.style.height = data.btn_size || '40px';let mKey = 0, mFlag = true;btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();prog.onclick = (e) => aud.currentTime = aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;aud.addEventListener('timeupdate', () => {prog.value = aud.currentTime / aud.duration * 100;cur.innerText = toMin(aud.currentTime);dur.innerText = toMin(aud.duration);for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {cKey = j;if (mKey === j) showLrc(data.lrcAr);else continue;}}});aud.addEventListener('pause', () => mState());aud.addEventListener('play', () => mState());aud.addEventListener('seeked', () => calcKey());let mState = () => aud.paused ? (lrc.style.setProperty('--state','paused'),btnplay.style.setProperty('--state', 'paused')) : (lrc.style.setProperty('--state','running'),btnplay.style.setProperty('--state', 'running'));let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrcAr;lrc.dataset.lrc = 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);};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;};(function mkSpan() {[...Array(10).keys()].forEach((ele, key) => {ele = document.createElement('span');ele.style.cssText += `background: linear-gradient(135deg, #${Math.random().toString(16).substr(-6)}, #${Math.random().toString(16).substr(-6)});transform: rotate(${key*36}deg) translate(18px)`;btnplay.appendChild(ele);});})();};mkPlayer.HCPlayer = playCode;})(this);

let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
HCPlayer({
      lrcAr: lrcAr,
         lrc_css: 'top: 520px; left: 20px; --bg: red; color: #ddd;',
      //player_css: 'bottom: 20px; left: 200px; --color: #ccc; --ww: 180px;',
});

</script>

红影 发表于 2022-11-20 21:31

手链按钮封装,做的真漂亮。也用了花潮时钟呢{:4_173:}{:4_187:}

醉美水芙蓉 发表于 2022-11-20 21:38

红影 发表于 2022-11-20 21:31
手链按钮封装,做的真漂亮。也用了花潮时钟呢

跟你学了一个!谢谢!

东篱闲人 发表于 2022-11-20 21:44

芙蓉远嫁啦?{:5_117:}

红影 发表于 2022-11-20 22:00

醉美水芙蓉 发表于 2022-11-20 21:38
跟你学了一个!谢谢!

不客气啊,都是黑黑的代码呢{:4_173:}

醉美水芙蓉 发表于 2022-11-20 22:10

东篱闲人 发表于 2022-11-20 21:44
芙蓉远嫁啦?

哈哈!

马黑黑 发表于 2022-11-20 22:25

东篱闲人 发表于 2022-11-20 21:44
芙蓉远嫁啦?

若没嫁对人咋办

东篱闲人 发表于 2022-11-21 16:49

马黑黑 发表于 2022-11-20 22:25
若没嫁对人咋办

改正过来。。。。{:5_112:}

马黑黑 发表于 2022-11-21 18:45

东篱闲人 发表于 2022-11-21 16:49
改正过来。。。。

那得重来

东篱闲人 发表于 2022-11-21 19:44

马黑黑 发表于 2022-11-21 18:45
那得重来

大不了从头再来。。。。{:5_117:}

闲言不语 发表于 2022-11-21 19:48

这是倪萍倪大姐远嫁{:4_397:}{:4_199:}

马黑黑 发表于 2022-11-21 19:59

东篱闲人 发表于 2022-11-21 19:44
大不了从头再来。。。。

也挺好

醉美水芙蓉 发表于 2022-11-21 20:38

闲言不语 发表于 2022-11-21 19:48
这是倪萍倪大姐远嫁

哈哈!谢谢不语老师支持!

小辣椒 发表于 2022-11-21 20:41

欣赏水芙蓉的精彩制作{:4_199:}

醉美水芙蓉 发表于 2022-11-21 20:44

小辣椒 发表于 2022-11-21 20:41
欣赏水芙蓉的精彩制作

谢谢辣椒美女支持!
页: [1]
查看完整版本: 远嫁的你嫁对了吗 (DJ沈念版)