本帖最后由 加林森 于 2022-4-7 21:53 编辑 <br /><br />大猫咪 发表于 2021-9-13 19:58
你怎么这么高兴啊?
<style type="text/css">
/* 帖子容器 */
#tzDiv {
position: relative;
left: -214px;
width: 1024px;
height: 600px;
top: 80px;
background: #eee url('https://pic.imgdb.cn/item/624ee490239250f7c54b5fe9.jpg') no-repeat center/cover;
opacity: 0.8;
}
/* 音乐控制按钮 */
.picBtn {
position: absolute;
width: 100px;
height: 100px;
left: 160px;
bottom: 60px;
border: none;
outline: none;
border-radius: 8px;
background: transparent url('https://pic.imgdb.cn/item/622a00ea5baa1a80ab412ada.gif') no-repeat;
cursor: pointer;
}
/* 文本时钟 */
#textClock {
position: absolute;
top: 180px;
right: 200px;
width: 300px;
height: 30px;
font: 20px / 30px Sans-Serif;
text-align: center;
}
/* 走马灯父框 */
.txtFly {
position: absolute;
width: 260px;
height: 30px;
right: 100px;
bottom: 100px;
overflow: hidden;
}
/* 走马灯文本 */
.txtFly div {
position: absolute;
left: 260px;
font: normal 18px /20px Sans-Serif;
word-break: keep-all;
white-space:nowrap;
}
/* 变色文本 */
.txtBg {
position: absolute;
top: 80px;
right: 100px;
font-size: 4rem;
color: transparent;
width: 500px;
height: 100px;
line-height: 100px;
text-align: center;
background-image: linear-gradient(90deg, green, olive, transparent, tomato, green);
background-size: 500px 100px;
background-position: 500px 0;
border: 1px solid;
background-clip: text;
-webkit-background-clip: text;
animation: chgc 2s linear infinite;
}
/* 文本变色动画 */
@keyframes chgc {
from { background-position: -500px 0; }
to { background-position: 0 0; }
}
</style>
<div id="tzDiv">
<div class="txtBg">城南清梦 </div>
<div id="textClock"></div>
<div class="txtFly">
<div id="ziFly">城南清梦 - MoFeansy(纯音乐)
</div>
</div>
<button id="picBtn" class="picBtn"></button>
<audio id="music" src="https://music.163.com/song/media/outer/url?id=1896630254.mp3" loop="loop" autoplay="autoplay" ></audio>
</div>
<script language="javascript">
fly(); //运行走马灯
showTime(); //显示时间
setInterval(showTime, 1000); //运行时钟
//文本时钟函数
function showTime(){
var now = new Date();
var year = now.getFullYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var day = now.getDay();
var hour = now.getHours();
if(hour < 10) hour = "0" + hour;
var minute = now.getMinutes();
if(minute < 10) minute = "0" + minute;
var second = now.getSeconds();
if(second < 10) second = "0" + second;
document.getElementById("textClock").innerHTML = year + "年" + month + "月" + date + "日 星期" + toHz(day) + "" + hour + ":" + minute + ":" + second;
}
function toHz(num) { var hz = "日一二三四五六九"; return(hz.charAt(num)); }
//音乐控制代码
var mu = document.getElementById('music');
var btn = document.getElementById('picBtn');
btn.onclick = function(){
mu.paused ? (mu.play(), btn.style.background="url('https://pic.imgdb.cn/item/622a00ea5baa1a80ab412ada.gif')") : (mu.pause(), btn.style.background="url('https://pic.imgdb.cn/item/622a01115baa1a80ab414665.png')");
}
mu.addEventListener("ended", function(){
btn.style.background="url('https://pic.imgdb.cn/item/622a01115baa1a80ab414665.png')";
});
//创建走马灯
function fly() {
var ziFly = document.getElementById('ziFly');
var width = ziFly.clientWidth;
var style = document.createElement('style');
style.type = 'text/css';
var flyStr = '@keyframes fly {to { left: -' + width + 'px; } }';
style.innerHTML = flyStr;
ziFly.appendChild(style);
ziFly.style.animation = 'fly 40s linear infinite';
}
</script>
<br><br><br><br><br>
打辫子PP猫肯定高兴{:5_117:}
大猫咪 发表于 2021-9-13 20:10
打辫子PP猫肯定高兴
你不怕小辫子打你?或者把你烤了?{:4_203:}
加林森 发表于 2021-9-13 20:14
你不怕小辫子打你?或者把你烤了?
猫不怕{:5_117:}
大猫咪 发表于 2021-9-13 20:18
猫不怕
真的假的?{:4_170:}
加林森 发表于 2021-9-13 20:22
真的假的?
真的真的{:5_117:}
大猫咪 发表于 2021-9-13 20:33
真的真的
要不要我喊小辫子啊?
加林森 发表于 2021-9-13 20:48
要不要我喊小辫子啊?
哈哈 小辫子发个帖就跑了{:4_170:}估计忙
大猫咪 发表于 2021-9-13 20:50
哈哈 小辫子发个帖就跑了 估计忙
啊?这小子说跑就跑啊?
加林森 发表于 2021-9-13 20:55
啊?这小子说跑就跑啊?
就是,不过上上来交作业的,变乖了 {:4_189:}
大猫咪 发表于 2021-9-13 20:56
就是,不过上上来交作业的,变乖了
给我地址,我去看看。
加林森 发表于 2021-9-13 21:00
给我地址,我去看看。
怕队长打PP{:5_106:}
大猫咪 发表于 2021-9-13 21:02
怕队长打PP
你敢不给?{:5_165:}
加林森 发表于 2021-9-13 21:04
你敢不给?
https://www.huachaowang.com/forum.php?mod=viewthread&tid=52590&extra=page%3D1
{:5_117:}
大猫咪 发表于 2021-9-13 21:05
https://www.huachaowang.com/forum.php?mod=viewthread&tid=52590&extra=page%3D1
这样才乖嘛
加林森 发表于 2021-9-13 19:23
就是,蛮好听的。
一起欣赏,重温经典
小辣椒 发表于 2021-9-13 21:37
一起欣赏,重温经典
嗯嗯,谢谢你帮忙!
加林森 发表于 2021-9-13 21:42
嗯嗯,谢谢你帮忙!
队长你咋老说谢谢{:4_203:}
小辣椒 发表于 2021-9-13 21:43
队长你咋老说谢谢
习惯习惯了!{:4_189:}
加林森 发表于 2021-9-13 21:55
习惯习惯了!
我们不用客气的{:4_179:}