掌门人
性别保密
威望 点
注册时间2020-12-9
最后登录1970-1-1
在线时间 小时
好友
UID53303
听众
阅读权限255
- 积分
- 166010
鲜花( 21485) 鸡蛋( 24)
|
楼主 |
发表于 2024-6-18 10:43
|
显示全部楼层
<style>
#mydiv { margin: 0px 0 0 100px; width: 300px; height:300px; background:#fff url('https://kg.qq.com/tx_tls_gate=pic.kg.qq.com/sz_ttkg/0/d64796d440b4d2b5047e47ef80f9f8fc598116ac/640') no-repeat center/cover; border-radius:8% 8%;box-shadow: 2px 2px 6px rgba(0,0,0,.6); overflow: hidden; z-index: 1; position: relative; }
txt-box { position: absolute;margin-left: 230px; margin-top: 230px;display: grid; place-items: center; top: var(--xx); bottom: 10px; width: 30px; height: 30px; font: normal 20px sans-serif; color: snow; cursor: pointer; transition: .5s; animation: move 5s var(--delay) linear infinite alternate var(--state); }
txt-box::after { position: absolute; content: '...'; inset: -4px; border: thick outset lightblue; border-radius:50% 0%; animation: rot 5s var(--delay) linear infinite alternate var(--state); }
txt-box:hover { filter: sepia(100%) drop-shadow(0 -80px 10px white); }
#vid { position: absolute; bottom: 0; width: 100%; height: calc(100% + 60px);border-radius:50% 50%; object-fit: cover; mix-blend-mode: multiply; opacity: .75; pointer-events: none; }
#vid2 {position: absolute;margin-top: 0px;width: 100%; height: 100%; top:0px;border-radius:50% 50%;transform: rotateY(180deg);object-fit: cover; pointer-events: none; mix-blend-mode: screen;z-index: 5;opacity: .59;}
@keyframes move { to { bottom:0px; } }
@keyframes rot { to { transform: rotateX(365deg); } }
</style>
<div id="mydiv">
<audio id="aud" src="http://cgi.kg.qq.com/fcgi-bin/fcg_get_play_url?shareid=mtpINMmAP-r_WmRk" autoplay loop></audio>
<img id="vid2" src="https://gd-hbimg.huaban.com/4d3a42272d2760f6deed127346944bd1f12294972a40b6-W51vl4">
</div>
<script>
(function() {
const ar = '晓'.split('');
const total = ar.length, half = Math.floor(ar.length / 2), ww =250;
let tbAr = [];
ar.forEach((t,k) => {
let tbox = document.createElement('txt-box');
tbox.textContent = t;
tbox.style.cssText += `
--xx: ${ww / total * k +1}px;
--delay: -${k < half ? k * 0.5 : (total - k) * 0.5}s;
`;
tbAr.push(tbox);
mydiv.appendChild(tbox);
});
aud.onplaying = aud.onpause = () => {
mydiv.style.setProperty('--state', ['running','paused'][+aud.paused]);
aud.paused ? vid.pause() : vid.play();
tbAr.forEach(tb => tb.title = ['暂停','播放'][+aud.paused]);
};
tbAr.forEach(tb => tb.onclick = () => aud.paused ? aud.play() : aud.pause());
})();
</script>
<br><br><br>
<div style=" margin: 0px 0 0 80px; position: absolute; font: bold 1.5em sans-serif; text-shadow: 1px 1px 2px #00000065; text-align: center; ">
<a style="color: #efa38b;text-decoration: none;" href="http://cgi.kg.qq.com/fcgi-bin/fcg_get_play_url?shareid=mtpINMmAP-r_WmRk" target="_blank">【致青春】晚霞中的红蜻蜓</a></div>
<br><br><br> |
|