帖赠:三月的阳光 贺生辰【大海--歌手:张雨生】
<style>#papa {
margin: 100px 0 0 calc(50% - 800px);
width: 1440px;
height: 731px;
background: #666 url('https://pan.365.tf/uploads/lxx/20221121/bjt.jpg') no-repeat center/cover;
box-shadow: 3px 3px 20px #000;
display: grid;
place-items: center;
position: relative;
}
#papa::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
opacity: .25;
background: url('https://pan.365.tf/uploads/lxx/20221121/dd.gif');
}
#dt {
position: absolute;
left: 00px;
bottom: 0px;
}
#dt1 {
position: absolute;
right: 680px;
top: 450px;
}
@keyframes tRun { to { transform: rotate(1turn);} }
@keyframes move { to { offset-distance: 100%;} }
#xx {position: absolute; left: 200px;top: 50; width: 12px;offset-distance: 0;offset-path: path("M500 -2 Q300 80, 600 200 T300 340");animation: move 8s linear infinite;}
#xx1 {position: absolute; left: -150px;top: -1px;width: 12px;offset-distance: 0;offset-path: path("M500 -5 Q300 80, 600 200 T400 440");animation: move 8s linear infinite;}
#xx2 {position: absolute; left: -300px;top: 100px;width: 32px;offset-distance: 0;offset-path: path("M500 -1 Q300 80, 600 200 T350 340");animation: move 8s linear infinite;}
#xx3 {position: absolute; left: 170px; top: 120px;width: 12px;offset-distance: 0;offset-path: path("M500 -1 Q300 80, 600 200 T450 440");animation: move 8s linear infinite;}
#xx4 {position: absolute; left: 150px;top: 30px;width: 32px;offset-distance: 0;offset-path: path("M500 -2 Q300 80, 600 200 T200 340");animation: move 8s linear infinite;}
#xx5 {position: absolute; left: 120px;top: 50px; width: 12px;offset-distance: 0;offset-path: path("M500 -1 Q300 80, 600 200 T550 340");animation: move 8s linear infinite;}
</style>
<div id="papa">
<img id="xx" src="https://wj.zp68.com/lxx/yunhua/2022/09/16/dt.jpg" alt="" />
<img id="xx1" src="https://wj.zp68.com/lxx/yunhua/2022/09/16/dt.jpg" alt="" />
<img id="xx2" src="https://pan.365.tf/uploads/lxx/20221121/sx.jpg" alt="" />
<img id="xx3" src="https://wj.zp68.com/lxx/yunhua/2022/09/16/dt.jpg" alt="" />
<img id="xx4" src="https://pan.365.tf/uploads/lxx/20221121/sx.jpg" alt="" />
<img id="xx5" src="https://wj.zp68.com/lxx/yunhua/2022/09/16/dt.jpg" alt="" />
<img id="dt" src="https://pan.365.tf/uploads/lxx/20221121/6.gif" alt="" />
<img id="dt1" src="https://pan.365.tf/uploads/lxx/20221121/95.gif " 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>
<audio id="aud" src="https://pan.365.tf/uploads/lxx/20221121/dah.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;bottom: 20px;grid-template-columns: auto auto auto;gap: 6px;display: grid;place-items: center;color: var(--color);font: normal 16px sans-serif;z-index: 999;--ww: 200px;--color: hsl(0, 100%, 100%);}#btnplay {--state: paused;width: 40px;height: 40px;background: conic-gradient(red,orange,yellow,green,teal,blue,purple);mask: radial-gradient(transparent 4px,red 0);-webkit-mask: radial-gradient(transparent 4px,red 0);border-radius: 50%;cursor: pointer;animation: rot 2s linear infinite;animation-play-state: var(--state);}#prog {width: var(--ww);height: 20px;opacity: .95;cursor: pointer;}#lrc {--motion: cover2;--tt: 2s;--state: paused;--bg: linear-gradient(180deg, hsla(60, 50%, 50%, .45), hsla(80, 70%, 50%, .6), hsla(0, 100%, 50%, .75));position: absolute;left: 20px;top: 10px;font: bold 2.6em 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"><span id="btnplay"></span><meter id="prog" max="100" low="25" high="75" optimum="85" value="0"></meter><span id="tmsg">00:00 | 00:00</span></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;tmsg.innerText = `${toMin(aud.currentTime)} | ${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;}};let setPinpu = () => {let eles = document.querySelectorAll('.pinpu');eles.forEach((item) => item.style.height = `${Math.floor(Math.random()*50) + 10}px`);};mkPlayer.HCPlayer = playCode;})(this);
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
HCPlayer({
lrcAr: lrcAr,
btn_size: '45px',
lrc_css: 'top: 120px; left: 620px; --bg: #4b7f05;',
player_css: 'bottom: 30px; left: 35%;--color: #c5c13f; --ww: 300px;',
});
</script>
<br></div>
<br><br><br> @三月的阳光 阳光今天是你的正日子,送上真挚的祝福,生日快乐!幸福永远!{:4_204:}{:4_204:}
帖子做的匆匆忙忙,千万不要嫌弃{:4_189:}
@马黑黑
黑黑 学习做一次光盘+meter封装播放器,最近玩的少,作业是少做许多了,以后再补吧 小辣椒 发表于 2022-11-21 20:05
@马黑黑
黑黑 学习做一次光盘+meter封装播放器,最近玩的少,作业是少做许多了,以后再补吧
不错的。不过你还没有用最新的发帖方式,给帖子的JS代码披件外套,评分后一切完好 小辣椒 发表于 2022-11-21 20:05
@马黑黑
黑黑 学习做一次光盘+meter封装播放器,最近玩的少,作业是少做许多了,以后再补吧
你可以改一改:
(function() {
//这里是原来的JS代码
})(); 马黑黑 发表于 2022-11-21 20:07
不错的。不过你还没有用最新的发帖方式,给帖子的JS代码披件外套,评分后一切完好
黑黑我都不知道最新的发帖方法{:4_198:} 马黑黑 发表于 2022-11-21 20:08
你可以改一改:
(function() {
黑黑有教程吗 马黑黑 发表于 2022-11-21 20:08
你可以改一改:
(function() {
我一直以为我后面加隔行码不对的,但老忘记,高度也是后来发现了,没有加top:150px; 小辣椒 发表于 2022-11-21 20:10
黑黑有教程吗
有的,你去后院看看那个评分测试帖 小辣椒 发表于 2022-11-21 20:13
我一直以为我后面加隔行码不对的,但老忘记,高度也是后来发现了,没有加top:150px;
top根据需要设置 小辣椒 发表于 2022-11-21 20:09
黑黑我都不知道最新的发帖方法
天冷了,披件外套而已{:4_170:} 马黑黑 发表于 2022-11-21 20:15
有的,你去后院看看那个评分测试帖
好的,我去看看 马黑黑 发表于 2022-11-21 20:16
天冷了,披件外套而已
这件外套我还真不知道的,那一定得找回来的{:4_170:} 这个漂亮,也有花潮时钟的呢。那个转话筒的动作真帅气。借亲爱的好帖同祝阳光生日快乐{:4_187:} 小辣椒 发表于 2022-11-21 20:18
这件外套我还真不知道的,那一定得找回来的
嗯嗯,丢了去拼夕夕入手一件 小辣椒 发表于 2022-11-21 20:17
好的,我去看看
{:4_190:} 马黑黑 发表于 2022-11-21 20:15
有的,你去后院看看那个评分测试帖
看了,后面做就穿这外套了,今天回几个帖就下了 小辣椒 发表于 2022-11-21 20:36
看了,后面做就穿这外套了,今天回几个帖就下了
嗯,注意休息、调养,并调整好心态 红影 发表于 2022-11-21 20:19
这个漂亮,也有花潮时钟的呢。那个转话筒的动作真帅气。借亲爱的好帖同祝阳光生日快乐
亲爱的,这个钟我已经忘记了,是套用你的{:4_189:}