孟婆求你赐我忘情汤 (套用学习黑黑错角播放器效果)
<meta charset="UTF-8"><style>
@import 'https://638183.freep.cn/638183/web/api/audioplayer.css';
.pa {
--offsetX: 81px;
--bg: url('https://wj.zp68.com/lxx/yunhua/2026/03/14/22.jpg') no-repeat center/cover;
color: white;
}
pa::after {
position: absolute;
content: '';
width: 100%;
height: 100%;
background: url('https://wj.zp68.com/lxx/yunhua/2026/05/18/22.png') no-repeat center/cover;
mask: linear-gradient(to right top, rgba(0,0,0,.5) 35%, rgba(0,0,0,.8) 55%);
-webkit-mask: linear-gradient(90deg, rgba(0,0,0,.5) 35%, rgba(0,0,0,.8) 55%);
z-index: -1;
}
.player {
width: 480px;
left: 37%;
bottom: 20px;
}
.btnFs {
top: -1125px;
right: 20px;
}
#msvg {
position: absolute;
width: 6vw;
height: 6vw;
left: 67%;
top:18%;
transition: .75s;
opacity: var(--opacity);
}
.lyrics-container {
position: absolute;
top: 30%;
left: 50%;
transform: translateX(-50%);
width: 90%;
max-width: 800px;
max-height: 120px;
overflow: hidden;
text-align: center;
color: white;
font-family: 'Microsoft YaHei', sans-serif;
text-shadow:
0 0 8px rgba(0, 0, 0, 0.9),
0 0 4px rgba(0, 0, 0, 0.9),
1px 1px 2px rgba(0, 0, 0, 0.9),
-1px -1px 2px rgba(0, 0, 0, 0.9);
z-index: 10;
background: transparent !important;
backdrop-filter: none;
-webkit-backdrop-filter: none;
border-radius: 0;
padding: 10px 20px;
}
.lyric-line {
line-height: 1.5;
margin: 10px 0;
transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
opacity: 0.3;
font-size: 1.2em;
transform: scale(0.95);
filter: blur(0.5px);
}
.lyric-line.active {
opacity: 1;
font-size: 1.8em;
font-weight: bold;
color: #fffacd;
text-shadow:
0 0 15px rgba(218,112,214, 0.9),
0 0 10px rgba(218,112,214, 0.7),
0 0 5px rgba(218,112,214, 0.5),
1px 1px 3px rgba(0, 0, 0, 0.1);
transform: scale(1.05);
filter: blur(0px);
}
.lyric-line.previous {
opacity: 0.7;
font-size: 1.4em;
transform: scale(1.0);
filter: blur(0px);
}
.lyric-line.next {
opacity: 0.5;
font-size: 1.0em;
transform: scale(0.9);
}
.lyric-line.inactive {
opacity: 0;
max-height: 0;
margin: 0;
overflow: hidden;
}
</style>
<div id="pa" class="pa">
<video class="pd-vid" src="https://img.tukuppt.com/video_show/2418175/00/18/94/5ef7a50c397ff.mp" autoplay loop muted></video>
<div id="lyricsBox" class="lyrics-container"></div>
<svg id="msvg" xmlns="http://www.w3.org/2000/svg" viewBox="-200 -200 400 400">
<g id="g1" class="rot brightness">
<title>播放/暂停(Alt+X)</title>
<circle cx="0" cy="0" r="190" fill="transparent"></circle>
</g>
</svg>
</div>
<script>
const lrcLyrics = `孟婆求你赐我忘情汤
(动感版)歌手: 铃花儿
作词:黑奔驰
作曲:黑奔驰
编曲:黑奔驰
孟婆求你赐我忘情汤
让我断了所有的念想
回头看半生的沧桑
全是爱情赐我的伤
我怕来世还在老地方
遇上你我还不完的账
喝下这碗再不思量
斩断所有儿女情长
今生缘分已到了散场
我又何苦还要去勉强
越是想要把你遗忘
越是深陷在这张网
就算青丝染白成了霜
或许我还不能够遗忘
既然不能地老天荒
就让思念陪我流浪
谢谢欣赏`;
var options = {
pa: '.pa',
urls: [['https://wj.zp68.com/lxx/yunhua/2026/03/14/01.mp3', '孟婆求你赐我忘情汤']],
btns: ,
lyrics: lrcLyrics
};
loadJs('https://638183.freep.cn/638183/web/api/audioplayer.min.js?v0', function() {
loadJs('https://638183.freep.cn/638183/svgdr/svgdr.min.js', tzRun);
});
function tzRun() {
let backgroundControl = {
isDynamic: false,
dynamicBg: 'url(https://wj.zp68.com/lxx/yunhua/2026/03/14/22.gif) no-repeat center/cover',
staticBg: 'url(https://wj.zp68.com/lxx/yunhua/2026/03/14/22.jpg) no-repeat center/cover',
init: function() {
this.pa = document.querySelector('.pa');
this.updateBackground();
},
updateBackground: function() {
if (this.isDynamic) {
this.pa.style.setProperty('--bg', this.dynamicBg);
} else {
this.pa.style.setProperty('--bg', this.staticBg);
}
},
syncWithMusic: function(audioElement) {
if (!audioElement) return;
audioElement.addEventListener('play', () => {
this.isDynamic = true;
this.updateBackground();
});
audioElement.addEventListener('pause', () => {
this.isDynamic = false;
this.updateBackground();
});
}
};
AudPlayer.prototype.parseLyrics = function(lrcText) {
const lines = lrcText.split('\n');
const lyricArr = [];
const timeRegex = /\[(\d{2}):(\d{2})\.(\d{2})\]/;
lines.forEach(line => {
const match = line.match(timeRegex);
if (match) {
const [, minutes, seconds, milliseconds] = match;
const timeInSeconds = parseInt(minutes) * 60 + parseInt(seconds) + parseInt(milliseconds) / 100;
const text = line.replace(timeRegex, '').trim();
if (text) {
lyricArr.push({ time: timeInSeconds, text });
}
}
});
lyricArr.sort((a, b) => a.time - b.time);
this.lyrics = lyricArr;
this.currentLyricIndex = 0;
};
AudPlayer.prototype.createLyricsContainer = function() {
if (!this.lyrics || this.lyrics.length === 0) return;
this.lyricsBox = document.getElementById('lyricsBox');
if (!this.lyricsBox) {
this.lyricsBox = document.createElement('div');
this.lyricsBox.id = 'lyricsBox';
this.lyricsBox.className = 'lyrics-container';
this.pa.appendChild(this.lyricsBox);
}
this.lyricsBox.innerHTML = '';
this.lyricLines = [];
this.lyrics.forEach((lyric, index) => {
const lineElem = document.createElement('div');
lineElem.className = 'lyric-line';
lineElem.textContent = lyric.text;
lineElem.dataset.index = index;
this.lyricsBox.appendChild(lineElem);
this.lyricLines.push(lineElem);
});
};
AudPlayer.prototype.updateLyrics = function(currentTime) {
if (!this.lyrics || this.lyricLines.length === 0) return;
let newIndex = this.currentLyricIndex;
while (newIndex < this.lyrics.length - 1 && this.lyrics.time <= currentTime) {
newIndex++;
}
while (newIndex > 0 && this.lyrics.time > currentTime) {
newIndex--;
}
if (newIndex !== this.currentLyricIndex) {
this.lyricLines.forEach(line => {
line.classList.remove('active', 'previous', 'next', 'inactive');
});
if (this.lyricLines) {
this.lyricLines.classList.add('active');
}
if (newIndex > 0 && this.lyricLines) {
this.lyricLines.classList.add('previous');
}
if (newIndex < this.lyrics.length - 1 && this.lyricLines) {
this.lyricLines.classList.add('next');
}
this.lyricLines.forEach((line, idx) => {
if (idx !== newIndex && idx !== newIndex - 1 && idx !== newIndex + 1) {
line.classList.add('inactive');
}
});
this.currentLyricIndex = newIndex;
if (this.lyricLines) {
this.lyricsBox.scrollTo({
top: this.lyricLines.offsetTop - this.lyricsBox.offsetHeight / 2 + this.lyricLines.offsetHeight,
behavior: 'smooth'
});
}
}
};
const originalBindAudEvents = AudPlayer.prototype.bindAudEvents;
AudPlayer.prototype.bindAudEvents = function() {
originalBindAudEvents.call(this);
this.aud.addEventListener('timeupdate', () => {
this.updateLyrics(this.aud.currentTime);
});
};
const originalConstructor = AudPlayer.prototype.constructor;
AudPlayer = class extends AudPlayer {
constructor(t = {}) {
super(t);
if (t.lyrics) {
this.parseLyrics(t.lyrics);
this.createLyricsContainer();
}
}
};
var aud = new AudPlayer(options);
var dr = window._dr(msvg);
dr.circle(0,0,15,'lightblue', 'white', 2).addTo(g1);
dr.circle(0, 160, 30, 'lightblue', 'white', 2).addTo(g1).rotates(7);
dr.circle(0, 100, 25, 'lightblue', 'white', 2).addTo(g1).rotates(7);
dr.circle(0, 50, 20, 'lightblue', 'white', 2).addTo(g1).rotates(7);
backgroundControl.init();
backgroundControl.syncWithMusic(aud.aud);
}
function loadJs(url, callback) {
var script = document.createElement('script');
script.charset = 'utf-8';
script.src = url;
script.onload = function() {
if (callback) callback();
};
document.head.appendChild(script);
}
</script>
@马黑黑
学习套用黑黑源码,感谢黑黑源码分享 好漂亮的制作,欣赏亲爱的好帖{:4_187:} 设计精妙,画面唯美。点三十二个赞。 本帖最后由 也曾年轻 于 2026-5-20 08:55 编辑
现在只看到
过会再来看看
设计漂亮,只是加载慢了点,谢谢小辣椒分享{:4_204:} 好漂亮的画面!看醉了!{:4_187:}{:4_204:}{:4_199:} 构图精美,歌词从中间上移,赞啦!小辣椒高手!{:4_185:} 红影 发表于 2026-5-19 22:40
好漂亮的制作,欣赏亲爱的好帖
谢谢亲爱的,支持和鼓励~~{:4_205:} 马黑黑 发表于 2026-5-19 22:55
设计精妙,画面唯美。点三十二个赞。
谢谢黑黑支持和鼓励{:4_205:} 也曾年轻 发表于 2026-5-20 08:52
现在只看到
老师我背景改了动图,双按钮联动背景和歌词一键停止,动图可能大了,打开会卡了 杨帆 发表于 2026-5-20 12:06
设计漂亮,只是加载慢了点,谢谢小辣椒分享
问好杨帆,谢谢欣赏,背景动图大了可能会加载慢一点 梦江南 发表于 2026-5-20 12:40
好漂亮的画面!看醉了!
阿姨晚上好,谢谢阿姨支持和鼓励{:4_205:} 小辣椒 发表于 2026-5-20 21:56
老师我背景改了动图,双按钮联动背景和歌词一键停止,动图可能大了,打开会卡了
现在能看到了,好漂亮! 梦江南 发表于 2026-5-20 12:42
构图精美,歌词从中间上移,赞啦!小辣椒高手!
阿姨谦虚了,应该小辣椒向阿姨学习的,{:4_185:} 小辣椒 发表于 2026-5-20 21:55
谢谢黑黑支持和鼓励
不阔气不阔气。小辣椒晚上嚎! 也曾年轻 发表于 2026-5-20 21:58
现在能看到了,好漂亮!
老师可以看见就好,{:4_205:} 马黑黑 发表于 2026-5-20 21:58
不阔气不阔气。小辣椒晚上嚎!
黑黑一起嚎{:4_170:} 小辣椒 发表于 2026-5-20 22:00
黑黑一起嚎
嚎嚎更快乐 小辣椒 发表于 2026-5-20 21:57
阿姨晚上好,谢谢阿姨支持和鼓励
早上问好,再来欣赏精美的音画。{:4_204:}
页:
[1]
2