- UID
- 1403
- 主题
- 回帖
- 0
- 精华
- 积分
- 13
- 金币
- 枚
- 草籽
- 颗
- 鲜花
- 朵
- 注册时间
- 2025-9-7
- 最后登录
- 1970-1-1
|
无权使用URL,更不能用代码了
有权限的可以试试。这里没有试过,不知能否行?
全民还有配套歌词可利用,
- <div id="zz" style="width:51.5px;margin: 0 auto;animation:rot 10s infinite linear" onclick="if(myAudio.paused){myAudio.play();this.style.animationPlayState='running'}else{myAudio.pause();this.style.animationPlayState='paused';}">
- <audio id="myAudio" style="pointer-events:none;-webkit-clip-path: circle(9% at 8.6% 50%);" controls>
- <source src="本歌曲全民连接(无权限贴)" type="audio/mpeg">
- 您的浏览器不支持音频元素。
- </audio>
- </div>
- <div id="lyrics-container" class="lyrics-line"></div>
- <style>
- @keyframes rot {from {transform: rotate(0deg)}to { transform: rotate(360deg);}}
-
- @font-face{font-family: "自定义";src: url(无权限) format("truetype");}
- #lyrics-container {
- font-family: "自定义",sans-serif;
- margin-top: 15px;
- font-size: 36px;
- text-align: center;
- min-height: 40px;
- font-weight: bold;
- white-space: nowrap; /* 确保歌词在一行内显示 */
- background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)); /* 线性渐变背景 */
- background-size: 200% 100%; /* 背景大小设置为200%宽度 */
- -webkit-background-clip: text; /* 裁剪背景到文字 */
- background-clip: text; /* 裁剪背景到文字 */
- -webkit-text-fill-color: transparent; /* 文字填充颜色设为透明 */
- text-fill-color: transparent; /* 文字填充颜色设为透明 */
- animation: scroll 5s linear infinite; /* 动画效果 */
- }
- @keyframes scroll {
- 0% {
- background-position: 200% 0; /* 背景位置从右侧开始 */
- }
- 100% {
- background-position: 0 0; /* 背景位置移动到左侧 */
- }
- }
- </style>
- <script>
- if(myAudio.autoplay){zz.style.animationPlayState='running'}else{zz.style.animationPlayState='paused'};
- const lrcData = [
- { time: "0.00", text: "《外面的世界》"},
- { time: "14.00", text: "翻唱:卡卡"},
- { time: "27.68", text: "在很久很久以前"},
- { time: "32.83", text: "你拥有我"},
- { time: "35.92", text: "我拥有你"},
- { time: "41.08", text: "在很久很久以前"},
- { time: "46.18", text: "你离开我"},
- { time: "48.82", text: "去远空翱翔"},
- { time: "54.33", text: "外面的世界很精彩"},
- { time: "60.94", text: "外面的世界很无奈"},
- { time: "67.67", text: "当你觉得外面的世界很精彩"},
- { time: "73.33", text: "我会在这里衷心的祝福你"},
- { time: "81.02", text: "每当夕阳西沉的时候"},
- { time: "86.7", text: "我总是在这里盼望你"},
- { time: "94.46", text: "天空中虽然飘着雨"},
- { time: "99.8", text: "我依然等待你的归期"},
- { time: "134.37", text: "在很久很久以前"},
- { time: "139.47", text: "你拥有我"},
- { time: "142.72", text: "我拥有你"},
- { time: "147.73", text: "在很久很久以前"},
- { time: "152.71", text: "你离开我"},
- { time: "155.47", text: "去远空翱翔"},
- { time: "161.02", text: "外面的世界很精彩"},
- { time: "167.69", text: "外面的世界很无奈"},
- { time: "174.41", text: "当你觉得外面的世界很无奈"},
- { time: "180.35", text: "我还在这里耐心的等着你"},
- { time: "187.79", text: "每当夕阳西沉的时候"},
- { time: "193.4", text: "我总是在这里盼望你"},
- { time: "201.1", text: "天空中虽然飘着雨"},
- { time: "206.53", text: "我依然等待你的归期"},
- { time: "241.24", text: "外面的世界很精彩"},
- { time: "247.92", text: "外面的世界很无奈"},
- { time: "254.56", text: "当你觉得外面的世界很无奈"},
- { time: "260.6", text: "我还在这里耐心的等着你"},
- { time: "268.01", text: "每当夕阳西沉的时候"},
- { time: "273.54", text: "我总是在这里盼望你"},
- { time: "281.39", text: "天空中虽然飘着雨"},
- { time: "286.76", text: "我依然等待你的归期"},
- { time: "293.36", text: "我依然等待你的归期"}
- ];
- const audio = document.getElementById('myAudio');
- const lyricsContainer = document.getElementById('lyrics-container');
-
- audio.addEventListener('timeupdate', function() {
- const currentTime = audio.currentTime;
- let currentLyric = "";
-
- for (let i = 0; i < lrcData.length; i++) {
- if (currentTime >= lrcData[i].time &&
- (i === lrcData.length - 1 || currentTime < lrcData[i + 1].time)) {
- currentLyric = lrcData[i].text;
- break;
- }
- }
-
- lyricsContainer.textContent = currentLyric;
- });
- </script>
复制代码 |
|