《阿伙金阳》 - 阿吉太组合
本帖最后由 亦是金 于 2025-1-2 13:07 编辑 <br /><br /><div class="t_fsz"><table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_1873342">
<div style="width: 1200px;height: 700px;box-shadow:0px 0px 1px 2px #045768, 0px 0px 0px 8px #99e5f5,0px 0px 5px 15px #045768;overflow:hidden;border-radius:1%;margin-top:50px;margin-LEFT: -310px;">
<style>
#papa {
margin: auto;
top:-80px;
left:0px;
width: 1200px;
height: 700px;
background: url('https://z4a.net/images/2023/04/08/wbj.png')0 0/100% 100%;
position: relative;
z-index: 1;
overflow: hidden;
}
#dt{
position: absolute;
top:0px;
left:0px;
z-index: 1;
width:1200px;
mix-blend-mode: lighten;
height:700px;
transition: .3s all ease;
}
#gj {
top:500px;
left:50px;
z-index: 20;
position: absolute;
transform:scale(1);
width: 500px;
height: 500px;
overflow: hidden;
}
#xzcp {
top:50px;
left:20px;
z-index: 20;
position: absolute;
width: 100px;
height: 100px;
cursor:pointer;
background:url('https://s1.ax1x.com/2023/02/28/ppCT07F.png') center/cover no-repeat;
animation: spin 10s infinite linear ;
}
@keyframes spin {100% { transform: rotate(-360deg);opacity: 1; }
}
#mplayer {
position: absolute;
top:0%;
left:0%;
z-index: 20;
width: 500px;
height: 500px;
cursor: pointer;
}
#vid { display: none; }
#canv {
mix-blend-mode: screen;
position: absolute;
display: block;
z-index: 1;
top:300px;
left:500px;
width: 600px;
height: 350px;
border-radius: 0%;
opacity: 1;
}
</style>
<style type="text/css">
@keyframes mv { from { background-position: 1200px 0; } to { background-position: 0 0; } }
body { overflow-x: hidden; }
#baiBox {
margin: auto;
width: 800px;
text-align: center;
font-family:微软简中圆;
font-size: 2.5rem;
font-weight: bold;
color: #f46ff6;
transform-origin: top;
animation: yao 1.0s linear infinite alternate;
}
@keyframes yao {
from{transform: perspective(800px) rotatex(30deg); }
to { transform: perspective(800px) rotatex(-30deg); }
}
.tit { position: relative;width: 300px;height: 30px;top:20px;LEFT: -400px;z-index: 100;filter: drop-shadow(-1px 1px 1px #ffffff)drop-shadow(0px -1px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff)drop-shadow(0px 0px 1px #ffffff) }
#tit:hover { color: green; }
</style>
<div id="hu" >
<div id="baiBox"
<div class="tit">
<span style="color:#fb52f9;"><span style="font-size:32px;">《阿伙金阳》 </span>
<span style="color:#3d46f7;"><span style="font-size:20px;">- 阿吉太组合</span></div>
<div style="position: relative;width: 500px;height: 50px;top:600px;LEFT: 980px;z-index: 100;filter: drop-shadow(-1px 1px 1px #e8f552)drop-shadow(0px -1px 1px #e8f552)drop-shadow(0px 0px 1px #e8f552)drop-shadow(0px 0px 1px #e8f552)drop-shadow(0px 0px 1px #e8f552)">
<p><span style="color:#ff0000;"><span style="font-family:华文隶书;"><span style="font-size:26px;"></span></span></span></p></div>
</style>
<div id="papa">
<div id='dt'><img id="testImg" src="https://z4a.net/images/2023/04/08/01.gif" width="100%" height="100%"></div>
<div id="gj" >
<div id="xzcp" ></div>
<divid="testBtn"><div id="mplayer" class="pink"></div></div>
</div>
<canvas id="canv"></canvas>
<div data-lrc="亦是金在线音乐" id="lrc">亦是金在线音乐</div>
</div>
<audio id="aud" src="https://wsaudiobssdlbig.kugou.com/202501021235/946457fa3993baed0a610bb6ed5fce0e/bss/extname/wsaudio/c7b112f84380eebcea8ccf270159808e.mp3" autoplay loop></audio>
<video id="vid" src="https://www.kumeiwp.com/sub/filestores/2023/04/07/e58946b3915704b2a113f4712762e415.mp4" loop autoplay muted></video>
<script>
let flag = true;
mplayer.onclick = () => {
flag ? mplayer.classList.add('purple') : mplayer.classList.remove('purple');
flag = !flag;
</script>
<style type="text/css">
#lrc {
--state: paused;
--motion: cover2;
--tt: 2s;
--bg: linear-gradient(180deg, #fcf13d, #fc48e9, #fc3d5d);
position: absolute;
z-index: 4;
left: 50%;
transform: translate(-50%);
top: 85%;
font:normal 2.0em 微软简中圆;
color: #000078;
white-space: pre;
-webkit-background-clip: text;
filter:drop-shadow(#FFFFFF 1px 0 0)drop-shadow(#FFFFFF 0 1px 0)drop-shadow(#FFFFFF -1px 0 0) drop-shadow(#FFFFFF 0 -1px0);
}
#lrc::before {
position: absolute;
content: attr(data-lrc);
width: 20%;
height: 100%;
color: transparent;
overflow: hidden;
white-space: pre;
background: var(--bg);
-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%; } }
</style>
<script >
(function() {
/*原始lrc歌词*/
let lrcStr = `
《阿伙金阳》 - 阿吉太组合
作词:吉子古且/李凤
作曲:吉子古且
编曲:杨 敏
LRC歌词编辑:亦是金
● ● ● ● ● ●
阿伙金阳梦里的天堂
金沙江畔美丽的霓裳
索玛花盛开 狮子山眺望
阿普的故事讲到了天亮
青山叠翠遥看云雾在游荡
锦花秀草身披五彩的霓裳
一步一景一片旖旎的风光
醉在金阳的苍穹
传说爱情也会被时光遗忘
留下漫山遍野青色的希望
江水摇曳月光等故人回望
爱在金阳的梦乡
阿伙金阳梦里的天堂
金沙江畔美丽的霓裳
索玛花盛开 狮子山眺望
阿哥的歌声唱到了天亮
阿伙金阳 心中的方向
波洛云海 浩瀚着希望
百草坡映照 金色的太阳
阿普的故事讲到了天亮
● ● ● ● ● ●
青山叠翠遥看云雾在游荡
锦花秀草身披五彩的霓裳
一步一景一片旖旎的风光
醉在金阳的穹苍
传说爱情也会被时光遗忘
留下漫山遍野青色的希望
江水摇曳月光等故人回望
爱在金阳的梦乡
阿伙金阳 梦里的天堂
金沙江畔 美丽的霓裳
索玛花盛开 狮子山眺望
阿哥的歌声唱到了天亮
阿伙金阳 心中的方向
波洛云海 浩瀚着希望
百草坡映照 金色的太阳
阿普的故事讲到了天亮
阿伙金阳 梦里的天堂
金沙江畔 美丽的霓裳
索玛花盛开 狮子山眺望
阿哥的歌声唱到了天亮
阿伙金阳 心中的方向
波洛云海 浩瀚着希望
百草坡映照 金色的太阳
阿普的故事讲到了天亮
-- 谢谢欣赏 --
`;
/*变量 :mKey - 当前歌词索引;mFlag :调用关键帧动画索引;averAdd :平均值补偿*/
let mKey = 0, mFlag = true, averAdd = 0.3;
/*函数 :获取每句歌词用时,歌词用时若超过平均值则取平均值,最后一句歌词则取平均值*/
let lrcTime = (ar) => {
let tmpAr = [];
for(j = 0; j <ar.length - 1; j ++) {
if(j !== ar.length - 1) tmpAr = parseFloat((ar - ar).toFixed(1));
}
let aver = parseInt(tmpAr.reduce((a,b) => a + b) / (tmpAr.length - 1)) + averAdd;
tmpAr.push(aver);
tmpAr.forEach((item,key) => {
ar = item > aver ? aver : item;
});
return ar;
};
/*函数 :从原始lrc歌词获取信息并存入 n*3 数组*/
let getLrcAr = (text) => {
let lrcAr = [];
let calcRule = ;
for(x of text.split('\n')) {
let ar = [];
let re = /\d+[\.:]\d+([\.:]\d+)?/g;
let geci = x.replace(re,'');
if(geci) {
geci = geci.replace(/[\[\]\'\"\t,]s?/g,'');
let time = x.match(re);
if(time != null) {
for(y of time) {
let tmp = y.match(/\d+/g);
let sec = 0;
for(z in tmp) sec += tmp * calcRule;
ar = ;
lrcAr.push(ar);
}
}
}
}
lrcAr.sort((a,b)=> a - b);
return(lrcTime(lrcAr));
};
/*函数 :模拟显示同步歌词*/
let showLrc = (time) => {
let name = mFlag ? 'cover1' : 'cover2';
lrc.innerHTML = lrcAr;
lrc.dataset.lrc = lrcAr;
lrc.style.setProperty('--motion', name);
lrc.style.setProperty('--tt', time + 's');
lrc.style.setProperty('--state', 'running');
mKey += 1;
mFlag = !mFlag;
};
/*函数 :处理当前歌词索引 mKey*/
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 time = lrcAr - (aud.currentTime - 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 mState = () => aud.paused ? (lrc.style.setProperty('--state','paused'),mplayer.style.animationPlayState = 'paused') : (lrc.style.setProperty('--state','running'),mplayer.style.animationPlayState = 'running');
/*监听播放进度*/
aud.addEventListener('timeupdate', () => {
for (j = 0; j < lrcAr.length; j++) {
if (aud.currentTime >= lrcAr) {
cKey = j;
if (mKey === j) showLrc(lrcAr);
else continue;
}
}
});
aud.addEventListener('pause', () => mState());/*监听暂停事件*/
aud.addEventListener('play', () => mState());/*监听播放事件*/
aud.addEventListener('seeked', () => calcKey());/*监听查询事件*/
let lrcAr = getLrcAr(lrcStr); /*获得歌词数组*/
mplayer.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());
xzcp.style.animationPlayState = aud.paused ? 'paused' : 'running';
aud.addEventListener('playing', () =>xzcp.style.animationPlayState = 'running');
aud.addEventListener('pause', () =>xzcp.style.animationPlayState = 'paused');
})();
</script>
<script>
let ctx = canv.getContext('2d');
let ww = canv.width =550, hh = canv.height =320;
let loop = () => {ctx.drawImage(vid, 0, 0, ww, hh);if(!vid.paused) {requestAnimationFrame(loop);return;}}
let toMin = (val) => {if (!val) return '00:00';val = Math.floor(val);let min = parseInt(val / 60),sec = parseFloat(val % 60);if (min < 6) min = '0' + min;if (sec < 6) sec = '0' + sec;return min + ':' + sec;};
let mState = () => aud.paused ? (papa.style.setProperty('--state', 'paused'),vid.pause()) : (papa.style.setProperty('--state', 'running'),vid.play());
vid.playbackRate = 0.5;
vid.addEventListener('play', loop, false);
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
aud.addEventListener('timeupdate', () => mplayer.dataset.tt = '\n\n' + toMin(aud.duration) + '\n' + toMin(aud.currentTime));
</script>
<script>
if ('getContext' in document.createElement('canvas')) {
HTMLImageElement.prototype.play = function() {
if (this.storeCanvas) {
// 移除存储的canvas
this.storeCanvas.parentElement.removeChild(this.storeCanvas);
this.storeCanvas = null;
// 透明度还原
image.style.opacity = '';
}
if (this.storeUrl) {
this.src = this.storeUrl;
}
};
HTMLImageElement.prototype.stop = function() {
var canvas = document.createElement('canvas');
// 尺寸
var width = this.width, height = this.height;
if (width && height) {
// 存储之前的地址
if (!this.storeUrl) {
this.storeUrl = this.src;
}
// canvas大小
canvas.width = width;
canvas.height = height;
// 绘制图片帧(第一帧)
canvas.getContext('2d').drawImage(this, 0, 0, width, height);
// 重置当前图片
try {
this.src = canvas.toDataURL("image/gif");
} catch(e) {
// 跨域
this.removeAttribute('src');
// 载入canvas元素
canvas.style.position = 'absolute';
// 前面插入图片
this.parentElement.insertBefore(canvas, this);
// 隐藏原图
this.style.opacity = '0';
// 存储canvas
this.storeCanvas = canvas;
}
}
};
}
var image = document.getElementById("testImg"),
button = document.getElementById("testBtn");
if (image && button) {
button.onclick = function() {
if (this.value == '') {
image.play();
this.value = '.';
} else {
image.stop();
this.value = '';
}
};
}
</script>
</td></tr></table> 欣赏精彩的制作,这视频还特意制作的频谱效果{:4_199:} 谢谢分享~~制作辛苦{:4_187:} 小辣椒 发表于 2023-4-8 16:03
欣赏精彩的制作,这视频还特意制作的频谱效果
问好小辣椒管理!{:4_187:} 亦是金 发表于 2023-4-8 16:15
问好小辣椒管理!
谢谢欣赏点评!祝你欣赏愉快!{:4_187:} 亦是金 发表于 2023-4-8 16:15
问好小辣椒管理!
哇塞~~~叫小辣椒就可以了 亦是金 发表于 2023-4-8 16:16
谢谢欣赏点评!祝你欣赏愉快!
谢谢精彩分享,制作辛苦{:4_187:}
美贴乐逍遥。 庶民 发表于 2023-4-8 18:26
美贴乐逍遥。
谢谢欣赏!问好!祝你欣赏愉快!{:4_191:} 小辣椒 发表于 2023-4-8 16:37
哇塞~~~叫小辣椒就可以了
{:4_187:} 小辣椒 发表于 2023-4-8 16:37
谢谢精彩分享,制作辛苦
谢谢欣赏!{:4_187:} 制作精彩,欣赏了 这个场景太美了,令人陶醉。欣赏亦是金老师好帖{:4_187:} 很精美的佳作,欣赏问好!{:4_190:} 绿叶清舟 发表于 2023-4-8 20:45
制作精彩,欣赏了
问好绿叶清舟!谢谢欣赏!{:4_187:} 红影 发表于 2023-4-8 22:09
这个场景太美了,令人陶醉。欣赏亦是金老师好帖
问好红影!祝你欣赏愉快!{:4_187:} 梦缘 发表于 2023-4-9 09:52
很精美的佳作,欣赏问好!
问好梦缘!祝你欣赏愉快!{:4_187:} 亦是金 发表于 2023-4-10 14:02
问好红影!祝你欣赏愉快!
问好亦是金老师,新周快乐{:4_187:} 红影 发表于 2023-4-10 22:12
问好亦是金老师,新周快乐
新周快乐!{:4_187:} 亦是金 发表于 2023-4-10 22:27
新周快乐!
谢谢,问好亦是金老师{:4_204:}
页:
[1]