个人引导页+音乐炫酷播放器
- 效果图
- 部分源码
- 完整源码领取
- 下期更新内容
效果图
部分源码
//网站动态标题开始
var OriginTitile = document.title,
titleTime;
document.addEventListener("visibilitychange",
function() {if (document.hidden) {document.title = "你别走吖 Σ(っ °Д °;)っ";clearTimeout(titleTime)} else {document.title = "(/≧▽≦/)你又回来啦! " ;titleTime = setTimeout(function() {document.title = OriginTitile},2000)}
});
//网站动态标题结束var t = null;t = setTimeout(time, 50);function time() {clearTimeout(t);dt = new Date();var y = dt.getFullYear();var mt = dt.getMonth() + 1;var day = dt.getDate();var h = dt.getHours();var m = dt.getMinutes();var s = dt.getSeconds();document.querySelector(".showTime").innerHTML =h + "时" + m + "分" + s + "秒";t = setTimeout(time, 1000);}var stop, staticx;var img = new Image();img.src = "https://p1.xywm.ltd/2022/07/31/62e604b42d4cf.webp";function Sakura(x, y, s, r, fn) {this.x = x;this.y = y;this.s = s;this.r = r;this.fn = fn}Sakura.prototype.draw = function(cxt) {cxt.save();var xc = 20 * this.s / 2;cxt.translate(this.x, this.y);cxt.rotate(this.r);cxt.drawImage(img, 0, 0, 20 * this.s, 20 * this.s);cxt.restore()};Sakura.prototype.update = function() {this.x = this.fn.x(this.x, this.y);this.y = this.fn.y(this.y, this.y);this.r = this.fn.r(this.r);if (this.x > window.innerWidth || this.x < 0 || this.y > window.innerHeight || this.y < 0) {this.r = getRandom("fnr");if (Math.random() > 0.4) {this.x = getRandom("x");this.y = 0;this.s = getRandom("s");this.r = getRandom("r")} else {this.x = window.innerWidth;this.y = getRandom("y");this.s = getRandom("s");this.r = getRandom("r")}}};SakuraList = function() {this.list = []};SakuraList.prototype.push = function(sakura) {this.list.push(sakura)};SakuraList.prototype.update = function() {for (var i = 0, len = this.list.length; i < len; i++) {this.list[i].update()}};SakuraList.prototype.draw = function(cxt) {for (var i = 0, len = this.list.length; i < len; i++) {this.list[i].draw(cxt)}};SakuraList.prototype.get = function(i) {return this.list[i]};SakuraList.prototype.size = function() {return this.list.length};
完整源码领取
关注微信公众号祖龙科技工作室回复 Pain主页即可领取源码https://www.123pan.com/s/ji8kjv-IjPU3.html
下期更新内容
孤客支付系统
- 📢本人公众号:祖龙科技工作室
- 📢博客主页:孤客网络科技工作室官方账号
- 📢欢迎点赞👍收藏⭐️留言 📝如有错误敬请指正!
- 📢本文由孤客原创,若侵权联系作者,首发于CSDN博客
- 📢停下休息的时候不要忘了别人还在奔跑,希望大家抓紧时间学习,全力奔赴更好的生活💻