整站下载工具_哪种公司需要做网站_搜建筑规范的网站_深圳嵌入式培训 JS
class Snowflake {constructor() {this.x = 0;this.y = 0;this.vx = 0;this.vy = 0;this.radius = 0;this.alpha = 0;this.reset();}reset() {this.x = this.randBetween(0, window.innerWidth);this.y = this.randBetween(0, -window.innerHeight);this.vx = this.randBetween(-3, 3);this.vy = this.randBetween(2, 5);this.radius = this.randBetween(1, 4);this.alpha = this.randBetween(0.1, 0.9);}randBetween(min, max) {return min + Math.random() * (max - min);}update() {this.x += this.vx;this.y += this.vy;if (this.y + this.radius > window.innerHeight) {this.reset();}}}class Snow {constructor() {this.canvas = document.createElement("canvas");this.ctx = this.canvas.getContext("2d");document.body.appendChild(this.canvas);window.addEventListener("resize", () => this.onResize());this.onResize();this.updateBound = this.update.bind(this);requestAnimationFrame(this.updateBound);this.createSnowflakes();}onResize() {this.width = window.innerWidth;this.height = window.innerHeight;this.canvas.width = this.width;this.canvas.height = this.height;}createSnowflakes() {const flakes = window.innerWidth / 4;this.snowflakes = [];for (let s = 0; s < flakes; s++) {this.snowflakes.push(new Snowflake());}}update() {this.ctx.clearRect(0, 0, this.width, this.height);for (let flake of this.snowflakes) {flake.update();this.ctx.save();this.ctx.fillStyle = "#FFF";this.ctx.beginPath();this.ctx.arc(flake.x, flake.y, flake.radius, 0, Math.PI * 2);this.ctx.closePath();this.ctx.globalAlpha = flake.alpha;this.ctx.fill();this.ctx.restore();}requestAnimationFrame(this.updateBound);}}new Snow();const comingdate = new Date("Feb, 2022 00:00:00");const d = document.getElementById("d");const h = document.getElementById("h");const m = document.getElementById("m");const s = document.getElementById("s");const countdown = setInterval(() => {const now   = new Date();const des   = comingdate.getTime() - now.getTime();const days  = Math.floor(des / (1000 * 60 * 60 * 24));const hours = Math.floor((des % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));const mins  = Math.floor((des % (1000 * 60 * 60)) / (1000 * 60));const secs  = Math.floor((des % (1000 * 60)) / 1000);d.innerHTML = getTrueNumber(days);h.innerHTML = getTrueNumber(hours);m.innerHTML = getTrueNumber(mins);s.innerHTML = getTrueNumber(secs);if (x <= 0) clearInterval(x);}, 1000);const getTrueNumber = x => (x < 10 ? "0" + x : x);

年货部分

HTML

<!DOCTYPE html>">
    
    




    


    
        
    

合肥建立网站

公司怎么注册产品品牌、免费网站模板源代码有哪些、永久使用、不限域名、装货柜平台设计

建设项目总报价?

整站下载工具_哪种公司需要做网站_搜建筑规范的网站_深圳嵌入式培训

集团网站建设设计方案手机浏览器主页推荐网上申请商标流程物联网的认识报价表设计全国十大传媒公司排名vi设计都包括哪些内容百度登录页面html市场营销策划总结公司托管经营模式开发软件的职业叫什么无敌神马琪琪观看影院在线企业网站搭建必选黔文科技网络销售岗位职责描述房地产市场价格成都路桥建模培训推荐一个门户网站web是什么意思翻译中国室内设计联盟课堂 覃老师新冠前三天症状发短视频是怎么赚钱的广州地铁11号线线路图sem属于seo的一部分上海企业查询职工居住证满五年什么意思网络营销的书籍推荐种业商务信息网邯郸疫情最新情况11月云南美容seo整站优化方案福田公司客户设计提案ppt范例来个网站能看的2021

猜你喜欢

  • 友情链接:
  • 全世界的黄页网站 碧桂园定州项目 大数据营销给企业带来的作用以及背后潜在的风险 上海公安门户网站申报户口事项申请表免费下载 网页制作中不可以使用的文件命名规则 乌鲁木齐网站制作多少钱