《黑猫警长》蓓蕾组合
<style>#papa { margin: 100px -160px ; width: 1164px; height: 1681px; background: url(https://pic2.imgdb.cn/item/6412e67aebf10e5d530a990b.gif)0 0/10%10%,linear-gradient(80deg, #000080, #003300, #ff0000, #00f000); box-shadow: 0px 0px 0px 2px #cccccc, 0px 0px 0px 10px #880000; position: relative; display: grid; place-items: center; z-index: 10000; overflow:hidden;transform:rotateX(0deg) scale(1)}
#papa:hover #fullscreen { display:block ;}
#fullscreen { position: absolute; top:20px; left:20px;color:#FF0000; font: bold 2em华文隶书; opacity: 1; cursor: pointer; z-index: 11}
#photos img{float:right;width:1000px;height:600px;position:relative;LEFT:0px;top:0px;overflow:hidden;border-radius:0px;-webkit-mask-image: radial-gradient(black 25% ,transparent 65%);filter:hue-rotate(0deg)contrast(120%)brightness(100%);z-index: -1;}
#playpause { position:absolute;top:650px;left:950px;width:150px;height:150px;z-index: 30;filter:drop-shadow(#000000 1px 0 0)drop-shadow(#000000 0 1px 0)drop-shadow(#000000 -1px 0 0) drop-shadow(#000000 0 -1px0);}
.photo {width: 100%;
height: 100%;
position: absolute;z-index: -2;
top:0px; left:0px;filter:contrast(120%)brightness(100%);
opacity: 0;
animation-name: round ;animation-duration: 48s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes round {0% {opacity: 0;filter:hue-rotate(360deg)}
10% {opacity: 1;}
18% {opacity: 0;}
}
img:nth-child(1) {
animation-delay: 42s;
}
img:nth-child(2) {
animation-delay: 36s;
}
img:nth-child(3) {
animation-delay: 30s;
}
img:nth-child(4) {
animation-delay: 24s;
}
img:nth-child(5) {
animation-delay: 18s;
}
img:nth-child(6) {
animation-delay: 12s;
}
img:nth-child(7) {
animation-delay: 6s;
}
img:nth-child(8) {
animation-delay: 0s;
}
.stop img:nth-child(1) {
animation-delay: 42s;animation-play-state: paused;
}
.stop img:nth-child(2){
animation-delay: 36s;animation-play-state: paused;
}
.stopimg:nth-child(3){
animation-delay: 30s;animation-play-state: paused;
}
.stop img:nth-child(4){
animation-delay: 24s;animation-play-state: paused;
}
.stop img:nth-child(5){
animation-delay: 18s;animation-play-state: paused;
}
.stop img:nth-child(6){
animation-delay: 12s;animation-play-state: paused;
}
.stop img:nth-child(7) {
animation-delay: 6s;animation-play-state: paused;
}
.stop img:nth-child(8) {
animation-delay: 0s;animation-play-state: paused;
}
</style>
<style>
#main {
position: relative;
overflow: hidden;
width: 100%; z-index: 2;
min-height: 98vh;
perspective: 340px;}
.stop #main {animation-play-state: paused;}
#stars {
position: absolute;z-index: 2;
top: 50%;
left: 50%;
width: 4px;
height: 4px;
border-radius:50%;
box-shadow: -238px 108px #fff000, 193px -376px #fff000, -1264px -60px #fff000,145px -443px #fff000, -1440px 37px #fff000, 262px -136px #fff000, 212px 219px #fff000, 319px 223px #fff000, 1246px -51px #c9c9c9,308px 26px #fff000, 147px 229px #fff000, -1041px 450px #fff000, 671px 86px white, -921px 234px #fff000, -957px 242px #fff000, 1249px -285px #fff000, 741px 434px #fff000, -1030px 330px #00f000, 311px -475px #fcfcfc, -413px -105px #ff0000, 868px -435px #f7f7f7, -790px 289px #ff0000, 202px 427px #fcfcfc, -22px -158px #ff0000, -1294px -297px #cccccc, -63px 200px #ff0000, -592px -86px #f7f7f7, -732px 366px white, -1426px -262px #e8e8e8, 475px -400px #ff0000, -1442px -153px #00ff00, 1124px -219px #ededed, 701px 257px #ff0000, 36px -179px #ff0000, -937px 480px #f7f7f7, -267px -418px #ff0000, 1467px 127px #ff0000, -1128px 274px #d1d1d1, -180px 430px #e0e0e0,180px 430px #ffffff, 624px 275px #ff0000, -473px 150px #e6e6e6, -537px -348px #d4d4d4, 410px 455px #ff0000, 497px -29px #cccccc, 416px -370px whitesmoke, 977px 82px #c2c2c2, 1209px -222px #f0f0f0, 637px 360px #fcfcfc,-416px 370px whitesmoke, -1049px 409px white, 959px 407px #ff0000, -1153px -168px #dedede, -437px -216px #dbdbdb, -572px 420px #ff0000, -228px 78px #ff0000, -925px 452px #ccffcc, 244px 30px #ff0000, 453px -336px #ff0000, -453px -336px #ff0000, 993px -63px #c2c2c2, 670px -343px #d9d9d9, -1088px 344px #ff0000, -170px -153px #fff000, 987px -208px #00ff00, 596px 166px #fcfcfc, -1362px -28px #ff0000, 1291px -106px #e3e3e3, -1128px 169px #ededed, 1056px 367px #ebebeb, 261px -128px #ff0000, 1017px 401px #cccccc, 1381px 245px #e3e3e3, 536px -113px #fafafa, -92px -217px #e3e3e3, 1481px 268px #00ff00, 832px -345px #000090, -863px 138px #00ff00, -997px -412px #e3e3e3, -330px -260px #ffff00, 691px -39px #fcfcfc, -468px -135px #ff0000, -535px 405px #e8e8e8, -1289px -284px #e3e3e3, 823px -225px #00ff00, -1172px -348px white, 505px -319px #ff0000, 94px -45px #ededed, -687px -64px #c7c7c7, -1133px -456px #e2f2f2, 1357px 135px #e0e0e0, -919px -249px whitesmoke, 206px 32px white, 1453px -338px #cccccc, -764px 83px #e8e8e8, 726px 85px #00f000, 205px 103px #e3e3e3, 85px 116px #d1d1d1, 1104px -121px #00ff00,-1104px 121px #fffcfc, 649px -304px #dbdbdb, -313px 313px whitesmoke, 491px -419px #c9c9c9, -1405px 397px #cfcfcf, 30px -81px #ff0000;130px -130px #eeeeee,1130px -230px #00f000,-1000px -1550px 30px 0px #ff0000,500px -350px 100px 0px #00ff00;
animation: fly 2s linear infinite;
transform-style: preserve-3d;
}
#stars:before{
content: "";
position: absolute;
width: inherit;
height: inherit;
box-shadow: inherit;
}
#stars:after {
content: "";
position: absolute;
width: inherit;
height: inherit;
box-shadow: inherit;
}
#stars:before {
transform: translateZ(-300px);
animation: fade1 2s linear infinite;
}
#stars:after {
transform: translateZ(-600px);
animation: fade2 2s linear infinite;
}
@keyframes fly {
from {
transform: translateZ(0px);
}
to {
transform: translateZ(300px);
}
}
@keyframes fade1 {
from {
opacity: 0.8;
}
to {
opacity: 1;
}
}
@keyframes fade2 {
from {
opacity: 0.2;
}
to {
opacity: 0.8;
}
}
</style>
<div id="papa">
<audio id="MusicPlayer" src="https://www.joy127.com/url/104771.mp3" autoplay loop></audio>
<span id="fullscreen"></span>
<div id="testImg" >
<img alt="" class="photo" src="https://pic2.imgdb.cn/item/645c72080d2dde57777c7a0d.jpg" /><img alt="" class="photo" src="https://pic2.imgdb.cn/item/645c72a40d2dde57777d17db.jpg" /><img alt="" class="photo"src="https://pic2.imgdb.cn/item/645cba540d2dde5777ddfda5.jpg" /><img alt=""class="photo"src="https://pic2.imgdb.cn/item/645c72e90d2dde57777d6482.jpg" /><img alt="" class="photo" src="https://pic2.imgdb.cn/item/645c73080d2dde57777d8830.jpg" /><img alt="" class="photo" src="https://pic2.imgdb.cn/item/645c73290d2dde57777dad93.jpg" /><img alt="" class="photo" src="https://pic2.imgdb.cn/item/645c73450d2dde57777dceb4.jpg" /><img alt="" class="photo" src="https://pic2.imgdb.cn/item/645c73610d2dde57777dee71.jpg" />
</div>
<div id="main" >
<div id="stars"></div>
</div>
<div class="bfbj">
<div type="button" id="btn">
<img id="playpause" src="https://img.fy6b.com/2023/05/12/46ca9b1f2046e.png" >
</div>
<div class="lrc">
<div class="p"> <liid="ullrc" >
</li>
</div>
</div>
</div>
</div>
<style>
.bfbj{
width: 100%;margin: 0px 150px;position: absolute;
}
#MusicPlayer{
width: 600px;
display: block;
margin: 0 auto;
}
#btn{
display: block;
margin: 0 ;
}
.lrc{
width: 980px;
height: 140px;position: absolute;
z-index: 3;
overflow: hidden;
display: block;filter:drop-shadow(#FFFfff 1px 0 0)drop-shadow(#FFFfff 0 1px 0)drop-shadow(#FFFfff -1px 0 0) drop-shadow(#FFFfff 0 -1px0);
margin: 740px 50px;
}
.lrc #ullrc{
width: 100%;
padding: 0;
list-style: none;
transition: 0.3s all ease;
margin: 0;
}
/*歌词普通样式*/
.lrc #ullrc li{
height: 80px;
line-height: 60px;
font-family:华文隶书;
font-size: 0px;
color: #000078;transform: translate(0%,0%);
font-weight: normal;
transition: .3s all ease;/*一定要加上不然看着突兀*/
list-style-type: none;
text-align:center;/*歌词显示对齐方式:left center right,默认居中(center)对齐*/
display: block;
width: 100%;filter:drop-shadow(#ffffff 1px 0 0)drop-shadow(#ffffff 0 1px 0)drop-shadow(#ffffff -1px 0 0) drop-shadow(#ffffff 0 -1px0);
margin: 0 auto;
}
/*动态歌词样式*/
.lrc #ullrc li.active{
font-size: 45px;color: #ff0000;
text-align:center;
transform: translate(0%,0%);
font-weight: normal;-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-image:linear-gradient(50deg, #fff000, #ff0000, #ffffff, #00f000);
background-position: 0px 0;
filter:drop-shadow(#000000 1px 0 0)drop-shadow(#000000 0 1px 0)drop-shadow(#000000 -1px 0 0) drop-shadow(#000000 0 -1px0);
-webkit-animation:loop 3s linear 2;
}
@-webkit-keyframes loop{
0%{background-position: -800px 0;}
}
</style>
<style type="text/css">.items { animation: slider 0.26s linear infinite ;}
@keyframes slider {from {opacity: 1;filter:hue-rotate(360deg)contrast(180%)brightness(200%);}
50% {opacity: 1;}to {opacity: 1;filter:hue-rotate(0deg)contrast(140%)brightness(100%);}}
</style>
<script >
var lrc = `《黑猫警长》杨烁
词/曲:蔡璐
眼睛瞪的像铜铃
射出闪电般的机灵
耳朵竖得像天线
听着一切可疑的声音
磨快了尖利的爪到处巡行
你给我们带来了生活安宁
啊哈啊啊哈啊黑猫警长
啊哈啊啊哈啊黑猫警长
森林公民向你致敬
向你致敬 向你致敬
脚步迈得多轻捷
露出侦探家的精明
虎视耽耽察敌情
留下威武矫健的身影
你磨快了尖利的爪到处巡行
你给我们带来了生活安宁
啊哈啊啊哈啊黑猫警长
啊哈啊啊哈啊黑猫警长
森林公民向你致敬
向你致敬 向你致敬
眼睛瞪的像铜铃
射出闪电般的机灵
耳朵竖得像天线
听着一切可疑的声音
你磨快了尖利的爪到处巡行
你给我们带来了生活安宁
啊哈啊啊哈啊黑猫警长
啊哈啊啊哈啊黑猫警长
森林公民向你致敬
向你致敬 向你致敬
脚步迈得多轻捷
露出侦探家的精明
虎视耽耽察敌情
留下威武矫健的身影
你磨快了尖利的爪到处巡行
你给我们带来了生活安宁
啊哈啊啊哈啊黑猫警长
啊哈啊啊哈啊黑猫警长
森林公民向你致敬
向你致敬 向你致敬
`;
function $(id) {
return document.getElementById(id);
}//这样写以后getid方便
function getLrcArray() {
var parts = lrc.split("\n");
for (let index = 0; index < parts.length; index++) {
parts = getLrcObj(parts);
}
return parts;
function getLrcObj(content) {
var twoParts = content.split("]");
var time = twoParts.substr(1);
var timeParts = time.split(":");
var seconds = +timeParts;
var min = +timeParts;
seconds = min * 60 + seconds;
var words = twoParts;
return{
seconds: seconds,
words: words,
};
}
}
var lrcArray = getLrcArray();
function inputLrc() {
for (let index = 0; index < lrcArray.length; index++) {
var li = document.createElement("li");
li.innerText = lrcArray.words;
$("ullrc").appendChild(li);
}
}
inputLrc();
function setPosition() {
var index = getLrcIndex();
if (index == -1) {
return;
}
var lrc_li_height = 80, lrc_ul_height = 60;
var top = index * lrc_li_height + lrc_li_height / 2 - lrc_ul_height / 2;
if (top < 0) {
top = 0;
}
$("ullrc").style.marginTop = -top + "px";
var activeLi = $("ullrc").querySelector(".active");
if(activeLi){
activeLi.classList.remove("active");
}
$("ullrc").children.classList.add("active");
}
var turn = 0;
function getLrcIndex(){
var time = $("MusicPlayer").currentTime + turn;
for (var index = 0; index < lrcArray.length; index++) {
if (lrcArray.seconds > time) {
return index - 1;
}
}
}
$("MusicPlayer").ontimeupdate = setPosition;
var image = document.getElementById("testImg"),
button = document.getElementById("btn");
if (image.classList && image && button) {
button.onclick = function() {
if (this.value == '.') {
image.classList.remove('stop');
this.value = '*';
} else {
image.classList.add('stop');
this.value = '.';
}
};
}
stars.style.animationPlayState = MusicPlayer.paused ? 'paused' : 'running';
MusicPlayer.addEventListener('playing', () =>stars.style.animationPlayState = 'running');
MusicPlayer.addEventListener('pause', () =>stars.style.animationPlayState = 'paused');
ztbs.style.animationPlayState = MusicPlayer.paused ? 'paused' : 'running';
MusicPlayer.addEventListener('playing', () =>ztbs.style.animationPlayState = 'running');
MusicPlayer.addEventListener('pause', () =>ztbs.style.animationPlayState = 'paused');
</script >
<script>
var aud = document.getElementById("MusicPlayer");
var img = document.getElementById("playpause");
img.onclick = function() {
if (aud.paused) {
aud.play();
} else {
aud.pause();
}
}
aud.addEventListener("play", function (e) {
img.src="https://img.fy6b.com/2023/05/12/1f63604dc416e.gif";
}, false);
aud.addEventListener("pause", function (e) {
img.src="https://img.fy6b.com/2023/05/12/46ca9b1f2046e.png";
}, false);
</script>
<script>
let fs = true;
fullscreen.onclick = () => {
fs ? (fullscreen.innerText = '', papa.requestFullscreen()) : (fullscreen.innerText = '', document.exitFullscreen());
fs = !fs;
};
</script>
欣赏收藏老师的 好看又好听,点赞! 欣赏一下,谢谢。 巫荣云师 发表于 2023-5-12 21:08
欣赏收藏老师的 好看又好听,点赞!
问候老师好!:handshake 蓝魔 发表于 2023-5-13 00:36
欣赏一下,谢谢。
问候老师好!:handshake
页:
[1]