家有购物官网_制作自己的app多少钱_邢台百姓网官网_营销网址大全 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>">
    
    



    
    


    
        
    

深圳政府门户网站设计亮点

长安网站建设推广公司、在珠海注册公司需要什么资料、永久使用、不限域名、域名注册网站免费

企业电商平台开发?

家有购物官网_制作自己的app多少钱_邢台百姓网官网_营销网址大全

经过多年的发展,我国已成为全球最大的电子制造基地,同时,也有着强大的电子元器件产业链作为支撑,具备独一无二的优势。而随着线上交易的兴起与国产半导体的崛起,我国电子供应链领域中元器件电商已是大势所趋,发挥着巨大的渠道作用。

国内顶尖设计椅子图片聚名网怎么提现网页制作及维护公司深圳营销型网站规划定制床需要多少钱成都高新区工商注册代办广告设计公司英文介绍满v变态页游平台小程序推广宣传词高端网站设计哪里比较好重庆小程序开发哪家好微信公众号要交钱吗小程序制作用什么软件论坛建站教程网页前端开发教程最好的优化公司排名公司企业发展建议泉州网站制作运营商专业下载ps软件免费版下载安装国内最好的危机公关公司南极电商是做什么的管理软件应用亚马逊雨林的原始部落深圳市建设项目重庆雕塑制作深圳比较大的外包公司有哪些数据库营销案例制作公司网页及oa公众号小程序二维码怎么生成兰州新病毒的最新消息免费网站管理软件

猜你喜欢

  • 友情链接:
  • it运维工程师需要掌握什么技能 软件app开发公司海报 太原seo网络推广平台 最漂亮的网页 网店运营以后可以做什么 软件开发培训机构网课