学习红影老师秋水悠悠
本帖最后由 有声有色 于 2025-9-6 11:50 编辑 <br /><br /><style>#beijing { left: -302px; top:120px; width: 1200px; height: 675px; background: gray url('https://pic1.imgdb.cn/item/6677905ed9c307b7e90b93cd.gif') no-repeat center/cover; box-shadow: 3px 3px 20px #000; overflow: hidden; user-select: none; position: relative; }
#mplayer { position: absolute; left:100px; bottom: 60px; width: fit-content; height: fit-content; display: flex; align-items: center; gap: 8px; z-index: 9; }
#btnwrap { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #ccc linear-gradient(to top right, rgba(255,0,0,.75), rgba(0,255,0,.75)); cursor: pointer; }
#btnwrap:hover { background: #000 linear-gradient(to top right, rgba(255,0,0,.75), rgba(0,255,0,.75)); }
#btnplay { width: 20px; height: 20px; background: #ccc; clip-path: polygon(0 0, 0% 100%, 100% 50%); }
#btnpause { width: 2px; height: 20px; border-style: solid; border-width: 0px 4px; border-color: transparent #eee; display: none; }
#prog { width: 200px; height: 2px; background: #ccc linear-gradient(to right,red,orange,green,tomato) no-repeat; background-size: 1px 2px; cursor: pointer; position: relative;}
#prog::before { position: absolute; content: ''; top: -7px; width: inherit; height: 15px; }
#prog:hover::before { background: rgba(0,200,200,.15); }
#tmsg { font: normal 16px sans-serif; color: #f90303;}
#lrc { position: absolute; left:150px; bottom: 110px; font: bold 1.3em sans-serif; color: #FDFDBD; text-shadow: 1px 1px 2px #000; text-align: center; z-index: 8; }
#lrc:hover, #tmsg:hover { color: snow; }
#papa { right:166px; top:220px; width: 300px; height: 300px;position: absolute; padding: 0; margin: 0;}
#papa::before { position: absolute; content: ''; left: -5px; top: -5px; bottom: -5px; right: -5px; box-shadow: 2px 2px 12px #000;}
#mama { left:-30px; top:-30px; width: 360px; height: 360px;overflow: hidden; position: absolute; }
.borderLine { position: absolute; animation: flow 4s var(--delay) linear infinite; }
.bl1 { --xx: 200%; --yy: 0%; --delay: 0s; left: -100%; top: 0; }
.bl2 { --xx: 0%; --yy: 200%; --delay: 2s; right: 0; top: -100%; }
.bl3 { --xx: -200%; --yy: 0%; --delay: 4s; right: -100%; bottom: 0; }
.bl4 { --xx: 0%; --yy: -200%; --delay: 6s; left: 0; bottom: -100%;}
@keyframes flow { to { transform: translate(var(--xx), var(--yy)); } }
.t1 { width: 360px; height: 12px; background:url('') no-repeat; }
.t2 { width: 12px; height: 360px; background:url('') no-repeat; }
.txt3d {
position: absolute;left:46px; top:5px;
width: 280px;
height: 280px;
line-height: 60px;
font-family: '微软雅黑', '黑体', sans-serif;
font-size: 1.6rem;
color: #f90303;
letter-spacing: 4px;
text-shadow: 1px 1px rgba(247, 247, 144,0.8),2px 2px rgba(247, 247, 144,0.8),3px 3px rgba(247, 247, 144,0.8),4px 4px rgba(247, 247, 144,0.8);
}
</style>
<div id="beijing">
<div id="mplayer"><span id="btnwrap"><span id="btnplay"></span><span id="btnpause"></span></span><span id="prog"></span><span id="tmsg">00:00 | 00:00</span></div>
<div id="lrc">lrc歌词</div>
<div id="papa">
<div id="mama">
<div class="borderLine bl1 t1"></div>
<div class="borderLine bl2 t2"></div>
<div class="borderLine bl3 t1"></div>
<div class="borderLine bl4 t2"></div>
</div>
<p class ="txt3d">庭草銜秋自短长<br>悲蛩传响答寒螀<br>豆花似解通邻好<br>引蔓殷勤远过墙<br> 高翥【秋日】</p></div>
<div style="position: absolute; left:680px; top: 46px; width:650px;opacity: 1;">
<img alt="" src="f"/></div>
</div><br><br><br><br><br><br>
<script>
let lrcAr = [
['0.24','作词 : 陶江平'],
['2.31','作曲 : 陶江平'],
['2.75','秋天的风 它不曾见过桃花'],
['6.17','春天的雨 却温柔那片荒沙'],
['10.78','像时光会倒流'],
['12.83','像星星会说话'],
['14.86','相信你终会抵达'],
['18.36','掌心捧雪 寒夜里待它融化'],
['21.82','飞蛾扑火 将余生抵作代价'],
['26.91','漫长的跋涉 崩裂伤疤'],
['30.06','不愿放下'],
['34.59','秋天的风 它不曾见过桃花'],
['38.50','春天的雨 却温柔那片荒沙'],
['42.93','像时光会倒流'],
['45.03','像星星会说话'],
['47.31','相信你终会抵达'],
['50.70','掌心捧雪 寒夜里待它融化'],
['54.61','飞蛾扑火 将余生抵作代价'],
['59.18','漫长的跋涉 崩裂伤疤'],
['62.69','不愿放下']
];
let aud = new Audio();
aud.src ='https://link.hhtjim.com/163/1810299654.mp3';
aud.autoplay = true;
aud.loop = true;
btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.addEventListener('pause', () => btnstate());
aud.addEventListener('play',() => btnstate());
aud.addEventListener('timeupdate', () => {
prog.style.backgroundSize = prog.offsetWidth * aud.currentTime / aud.duration + 'px 2px';
tmsg.innerText = toMin(aud.duration) + ' | ' + toMin(aud.currentTime);
for(j=0; j<lrcAr.length; j++) {
if(aud.currentTime >= lrcAr) lrc.innerText = lrcAr;
}
});
let btnstate = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none') : (btnplay.style.display = 'none', btnpause.style.display = 'block');
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;
}
</script> 看到这边框,我都快忘记是怎么做的了{:4_173:} 红影 发表于 2022-9-29 14:45
看到这边框,我都快忘记是怎么做的了
哈哈 有句老话贵人多忘事 有声有色的横向和纵向还是不一样的动态边框呢。厉害{:4_199:} 画面漂亮,动态因素使用得恰当,歌词同步也很准确,欣赏有声有色好帖{:4_199:} 红影 发表于 2022-9-29 14:52
画面漂亮,动态因素使用得恰当,歌词同步也很准确,欣赏有声有色好帖
谢谢你的夸奖,看到这张图,想起你有秋水悠悠的音画,就OT 有声有色 发表于 2022-9-29 14:48
哈哈 有句老话贵人多忘事
哈哈,我是照猫画虎学习黑黑代码,学得不深入,所以记不住{:4_173:} 有声有色 发表于 2022-9-29 15:07
谢谢你的夸奖,看到这张图,想起你有秋水悠悠的音画,就OT
非常漂亮的制作,很赞{:4_199:} 红影 发表于 2022-9-29 16:22
哈哈,我是照猫画虎学习黑黑代码,学得不深入,所以记不住
里面字能换颜色,这个换颜色的代码我知道#FDFDBD,因为PS就用这个来更换颜色,用英文代码来换颜色至今都没搞懂 有声有色 发表于 2022-9-29 17:07
里面字能换颜色,这个换颜色的代码我知道#FDFDBD,因为PS就用这个来更换颜色,用英文代码来换颜色至今都 ...
你说的是十六进制的颜色表示方式,还有RGB和HSL?后面这个我记不住了。
网上有RGB和十六进制在线互换,查查看就知道了。 一共就这三种,所以知道了也就不难了呢。 红影 发表于 2022-9-29 19:05
你说的是十六进制的颜色表示方式,还有RGB和HSL?后面这个我记不住了。
网上有RGB和十六进制在线互换,查 ...
我在试试 红影 发表于 2022-9-29 19:05
一共就这三种,所以知道了也就不难了呢。
好的 有声有色 发表于 2022-9-30 07:44
我在试试
我也是跟着学的,以前一点都不知道{:4_173:} 有声有色 发表于 2022-9-30 07:44
好的
对了,别说红影老师啊,我不是老师的呢{:4_173:} 红影 发表于 2022-9-29 19:05
一共就这三种,所以知道了也就不难了呢。
你们有一定外语基础 红影 发表于 2022-9-30 11:16
对了,别说红影老师啊,我不是老师的呢
那叫啥呢,用国语叫呢,还是用沪语叫呢 有声有色 发表于 2022-9-30 11:23
你们有一定外语基础
我中学学过英语,大学是同济的,变德语了。现在两种外语都不咋样{:4_173:} 有声有色 发表于 2022-9-30 11:25
那叫啥呢,用国语叫呢,还是用沪语叫呢
就叫影子多省力,打字也方便{:4_173:} 红影 发表于 2022-9-30 12:58
我中学学过英语,大学是同济的,变德语了。现在两种外语都不咋样
我记得刚上学,学的是三字经,没多久好像学了点俄语,小学还五年制,所以初中68届,正赶上山下乡,糊里糊涂就去了大西北
页:
[1]
2