<庆国庆>法律人士说这样不违法【个人头像在红旗下】
本帖最后由 亚伦影音工作室 于 2023-10-7 12:15 编辑 <br /><br /><style >#papa{margin: 10px -300px ;
width: 1164px;box-shadow: 0px 0px 0px 2px #cccccc, 0px 0px 0px 6px #880000; overflow: hidden;
height: 620px;
border: 1px solid;
background: #333 url('https://img-qn.51miz.com/preview/video/00/00/16/09/V-160918-724F32DC.jpg!/quality/90/unsharp/true/compress/true/format/jpg/fw/800') no-repeat center/cover;
position: relative;z-index: 12345;}
#img_border{position: absolute;top:2%; left:44%;width: 40%;height: 90%;z-index:3;-webkit-mask-image: radial-gradient(black 25% ,transparent 65%);}
#benban{position: absolute;top:0%; left:0%;width: 100%;height: 100%;z-index:4;background:linear-gradient(0deg, #000000 2%,#000000 8%,rgba(2, 2, 2, 0) 30%,rgba(52, 152, 219, 0) 100%,rgba(2, 2, 2, 0) 100%,black 100%);}
#papa:hover #fullscreen { display:block ;}
#fullscreen { position: absolute; top:5%; left:80%;color:#FFffff; filter:drop-shadow( 1px 1px 1px #000000);font: normal 3em华文隶书; opacity: 1; cursor: pointer; z-index: 111}
#dt{position: absolute;top:0%; left:0%;z-index: 2;
width:100%;
height:100%; transition: .3s all ease;}
#mplayer {top:65%; left:5%;z-index: 3;
position: absolute;
font: normal 7em/0em serif;
color:#ffffff;
cursor: pointer;
animation: spin 10s infinite linear;
}
@keyframes spin {0% { transform: rotate(360deg); }
}
#audio{top:90%; left:0%;z-index: 6;
position: absolute;
width:100%;
cursor: pointer;
mix-blend-mode: lighten;filter:invert(100%)
}
#flyBox { --w: 90%; width: var(--w); overflow: hidden; color: #cccccc; position: absolute; left:3%;top:88%;font-size: 14px; z-index: 36;}
#flyBox div { word-break: keep-all; white-space: nowrap; animation: fly 60s linear infinite; background:#0000}
@keyframes fly { from { transform: translateX(100%); } to { transform: translateX(calc(0% - var(--w))); }}
</style>
<div id='papa'>
<span id="fullscreen">全屏观赏</span>
<div id='benban' ></div>
<div id="img_border"><imgsrc="https://www.yiyuen.com/e/file/view/638177" width="100%" height="100%"></div>
<div id='dt'><img id="testImg" src="https://pic.imgdb.cn/item/6513c2bbc458853aef30d141.gif" width="100%" height="100%"></div>
<div id="lrc" data-lrc="亚伦影音工作室">亚伦影音工作室</div>
<div id="mplayer"></div>
<div id='audio'>
<audio id="aud" src="https://www.qqmc.com/mp3/music270286470.mp3"style="width:100%;"autoplay="autoplay" controls="controls" height="100%" loop="loop"></audio></div>
<div id="flyBox"><div>祝福祖国繁荣昌盛 祝福论坛的朋友们合家快乐! 发行:亚伦影音工作室</div></div>
</div>
<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;
}
}
};
}
let fs = true;
fullscreen.onclick = () => {
fs ? (fullscreen.innerText = '退出全屏', papa.requestFullscreen()) : (fullscreen.innerText = '全屏观赏', document.exitFullscreen());
fs = !fs;
};
var image = document.getElementById("testImg");
let mState = () => aud.paused ? image.stop() : image.play();
aud.addEventListener('play', mState,false);
aud.addEventListener('pause', mState,false);
</script>
<style>
#lrc {
--state: paused;
--motion: cover2;
--tt: 2s;
--bg: linear-gradient(180deg, #880000, #880000);
position: absolute;
left: 50%;z-index: 20;
transform: translate(-50%);
top: 70%;
font:normal 3em 华文隶书;
color: #0000;
white-space: pre;
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{ 0% { width: 0%;letter-spacing: 15px; color:#000090;}100% { width: 350%; letter-spacing: 0px;color:#ff0000; } }
@keyframes cover2 {0% { width: 0%;letter-spacing: 0px; color:#00ff00;}100% { width: 350%; letter-spacing: 15px;color:#ff0000; }}
</style>
<script >
(function() {
/*原始lrc歌词*/
let lrcStr = `
作词: 张子恩/童边
作曲: 雷蕾
风吹云动天不动
水推船移岸不移
刀切莲藕丝不断
山高水远情不离
雨绵绵情依依
多少故事在心里
五月烟雨蒙蒙唱扬州
百年巧合话惊奇
善恶皆会得报应
祸福自然有天理
姻缘桩桩似线牵
万事悠悠当自立
雨绵绵情依依
多少故事在心里
五月烟雨蒙蒙唱扬州
百年巧合话惊奇
雨绵绵情依依
多少故事在心里
五月烟雨蒙蒙唱扬州
百年巧合话惊奇
百年巧合话惊奇`;
/*变量 :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());/*监听查询事件*/
mplayer.addEventListener('click', () => { aud.paused ? aud.play() : aud.pause(); });
mplayer.style.animationPlayState = aud.paused ? 'paused' : 'running';
aud.addEventListener('playing', () =>mplayer.style.animationPlayState = 'running');
aud.addEventListener('pause', () =>mplayer.style.animationPlayState = 'paused');
let lrcAr = getLrcAr(lrcStr); /*获得歌词数组*/
})();
</script>
本帖最后由 亚伦影音工作室 于 2023-9-27 14:32 编辑
最近在网上看到这样效果的图片,视频,抖音,偶发奇想,用自己头像做了这个贴;如果你喜欢换成自己头像吧!自己形象太差不入镜!
你觉得后边背景图片和自己头像及音乐不合适你就换换,大力支持你改编加工!
那么,这位是谁呢{:4_173:} 共同庆祝伟大祖国七十四周年华诞{:4_187:} 红影 发表于 2023-9-27 11:12
那么,这位是谁呢
见笑了! 亚伦影音工作室 发表于 2023-9-27 11:25
见笑了!
这位就是亚伦老师吧{:4_187:} 欣赏欣赏 啊~~~亚伦是你真人? 我还以为你年轻人的{:4_170:} 感觉你好严肃哦,来~~笑一个,帅哥{:4_187:} 看了亚伦的照片,估计玩代码都几十年了,和我师父应该差不多年龄,难怪代码高手的{:4_178:} 这个背景动图做的好 小辣椒 发表于 2023-9-27 21:25
我还以为你年轻人的
吓到你美女了吧!还年轻人哩,都老掉牙了!真不敢了! 亚伦影音工作室 发表于 2023-9-27 21:45
吓到你美女了吧!还年轻人哩,都老掉牙了!真不敢了!
反正你不算老,现在老人玩网络的不要太多哦,主要你比较帅{:4_170:}而且还代码玩这么好,好佩服你的 小辣椒 发表于 2023-9-27 21:26
感觉你好严肃哦,来~~笑一个,帅哥
{:4_173:}红旗下就该严肃!{:4_204:} 红影 发表于 2023-9-27 14:20
这位就是亚伦老师吧
老了都不敢见人了! 亚伦影音工作室 发表于 2023-9-27 21:55
老了都不敢见人了!
哪里,正当年啊,很正气。能发自己照片,说明了一份信任和坦诚。很赞的{:4_199:} 亚伦影音工作室 发表于 2023-9-27 21:50
红旗下就该严肃!
重新配个美女做一个{:4_170:} 小辣椒 发表于 2023-9-27 22:05
重新配个美女做一个
最好把辣椒美女的头像放上!
页:
[1]
2