老屋(学习黑黑歌词微调和描边歌词)
<style>#papa { left: -302px; width: 1200px; height: 675px; background: url('https://pic.imgdb.cn/item/632fc69416f2c2beb1fbadbc.gif') no-repeat center/cover; box-shadow: 3px 3px 20px #000; box-shadow: 3px 3px 20px #000; display: flex; justify-content: center; overflow: hidden; position: relative; z-index: 1; }
#mplayer { position: absolute; bottom: 200px; right:180px; width: 240px; height: 80px; user-select: none; display: grid; place-items: center; cursor: pointer; }
#mplayer:hover #btnwrap, #mplayer:hover #prog { transform: translateY(var(--yy)); }
#mplayer:hover #btnwrap { background: linear-gradient(to top right, #000, #607E6C); opacity: 1; }
#btnwrap, #prog { position: absolute; display: grid; place-items: center; transition: .5s; }
#btnwrap { --yy: -15px; width: 40px; height: 40px; border-radius: 50%; border: 4px solid lightgreen; opacity: 0.1;}
#btnplay { width: 20px; height: 20px; background: #eee; 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 { --yy: 20px; width: 240px; height: 18px; border-radius: 10px; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(60,179,113,.75) 70%, transparent 0); border: 1px solid lightgreen; font: normal 14px/18px sans-serif; color: snow; }
#lrc { position: absolute; bottom: 40px; right:100px; font: bold 2.2em sans-serif; color: transparent; background: linear-gradient(-90deg, #2E8B57, #C6E3CC) 0 0 / 200% 200%; filter: drop-shadow(2px 2px 4px #000); background-clip: text; -webkit-background-clip: text; text-stroke: 1px lightgreen; -webkit-text-stroke: 1px #607E6C; }
@keyframes bgMove1 { from { background-position: 0 0; } to { background-position: -100% 0; } }
@keyframes bgMove2 { from { background-position: 0 0; } to { background-position: -100% 0; } }
#yanqun { position: absolute; left: 370px; top: 0px; opacity: .5; }
.wenzi { position: absolute; top: 200px; right:80px; z-index: 10; }
.text {animation: stroke 5s infinite alternate;letter-spacing: 10px;font-size: 150px;}
@keyframes stroke {
0% {fill: rgba(72, 138, 20, 0);stroke: rgba(96, 126, 108, 1);stroke-dashoffset: 25%;stroke-dasharray: 0 50%;stroke-width: 1;}
70% {fill: rgba(72, 138, 20, 0);stroke: rgba(96, 126, 108, 1);stroke-width: 3;}
90%,100% {fill: rgba(104, 135, 117, 0.8);stroke: rgba(96, 126, 108, 0);stroke-dashoffset: -25%;stroke-dasharray: 50% 0;stroke-width: 0;}}
</style>
<div id="papa">
<img id="yanqun" src="https://pic.imgdb.cn/item/62479cbe27f86abb2adbb9bd.gif" alt="" />
<div id="lrc">花潮lrc在线</div>
<div id="mplayer">
<div id="btnwrap"><span id="btnplay"></span><span id="btnpause"></span></div>
<div id="prog">00:00 | 00:00</div>
</div>
<div class="wenzi text"><svg width="400" height="200"><g><text x="10" y="150" font-family="华文隶书"> 老屋 </text></g></svg></div>
</div>
<script>
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
let mKey = 0, mFlag = true, aud = new Audio();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.src = 'https://music.163.com/song/media/outer/url?id=1955960919.mp3';
aud.autoplay = true;
aud.loop = true;
btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
aud.addEventListener('seeked', () => calcKey());
aud.addEventListener('timeupdate', () => {
prog.style.background= 'linear-gradient(90deg, rgba(0,0,0,.45), rgba(60,179,113,.75) ' + aud.currentTime / aud.duration * 100 + '%, transparent 0)';
prog.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
for(j=0; j<lrcAr.length; j++) {
if(aud.currentTime >= lrcAr) {
if(mKey === j) showLrc(lrcAr);
else continue;
}
}
});
let mState = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none',
lrc.style.animationPlayState = 'paused') : (btnplay.style.display = 'none', btnpause.style.display = 'block',
lrc.style.animationPlayState = 'running');
let showLrc = (time) => {
lrc.style.animation = (mFlag ? 'bgMove1 ' : 'bgMove2 ') + time + 's linear forwards';
lrc.innerHTML = lrcAr;
mKey += 1;
mFlag = !mFlag;
}
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 mtime = lrcAr - (aud.currentTime - lrcAr);
showLrc(mtime);
}
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> 加林森 发表于 2022-9-25 11:24
这个老屋漂亮。赞!
多谢队长鼓励,期待着队长康复一起回来玩{:4_187:} 看到这个图片,觉得很有感觉。每个人心目中都有个凝结着童年的老屋,马上国庆了,趁节假日多去探望探望老人们,他们的心里,你们是最无可替代的。 想把歌词等都调得跟背景接近点,结果描边有点看不出了呢{:4_173:} 红影 发表于 2022-9-24 13:36
想把歌词等都调得跟背景接近点,结果描边有点看不出了呢
很清楚啊,可以看见的{:4_178:} 亲爱的,漂亮的制作,这个标题字特别漂亮 这样的老屋,还存于世的不多了 童年的欢声笑语,尽在老屋的记忆中…… 小辣椒 发表于 2022-9-24 16:26
很清楚啊,可以看见的
能看见就好,调颜色调了半天{:4_173:} 小辣椒 发表于 2022-9-24 16:28
亲爱的,漂亮的制作,这个标题字特别漂亮
SVG的,本来想做黑黑那个SVG字的歌词,结果发现了这个动态文字{:4_173:} 马黑黑 发表于 2022-9-24 18:10
这样的老屋,还存于世的不多了
是啊,这样的老屋如同钥匙,会开启通往童年时光的闸门。 马黑黑 发表于 2022-9-24 18:39
童年的欢声笑语,尽在老屋的记忆中……
我们被外面的花花世界吸引,总忘记故乡老屋那些无尽的守候和期盼。。。 醉美水芙蓉 发表于 2022-9-24 19:43
红影做得非常棒!歌词图片搭配吻合!
多谢水芙蓉美女,看到这个图图觉得特别有感觉。{:4_187:} 红影 发表于 2022-9-24 13:36
看到这个图片,觉得很有感觉。每个人心目中都有个凝结着童年的老屋,马上国庆了,趁节假日多去探望探望老人 ...
这个可以有,千万别等到“子欲养而亲不待。”徒留遗憾! 红影 发表于 2022-9-24 19:51
我们被外面的花花世界吸引,总忘记故乡老屋那些无尽的守候和期盼。。。
但不总会这样
红影 发表于 2022-9-24 19:49
是啊,这样的老屋如同钥匙,会开启通往童年时光的闸门。
非常不错的主要,很赞 云中子 发表于 2022-9-24 20:04
这个可以有,千万别等到“子欲养而亲不待。”徒留遗憾!
这个说得太对了,仙人说话就是在点子上{:4_199:} 红影 发表于 2022-9-24 20:12
这个说得太对了,仙人说话就是在点子上
哈哈,夸的俺找不到洞府了 马黑黑 发表于 2022-9-24 20:11
但不总会这样
这首歌词说得还挺实在的,挺让人共鸣的。 马黑黑 发表于 2022-9-24 20:11
非常不错的主要,很赞
本来想用王琪的《万爱千恩》的,那首歌也挺感人,但从场景看还是这首更合适点。