当前位置: 首页 > news >正文

发帖子的网站线下实体店如何推广引流

发帖子的网站,线下实体店如何推广引流,c语言软件开和网站开发区别,网站建设前台后台文章目录 前言代码使用后言 前言 hello world欢迎来到前端的新世界 😜当前文章系列专栏:前端系列文章 🐱‍👓博主在前端领域还有很多知识和技术需要掌握,正在不断努力填补技术短板。(如果出现错误,感谢大家…

文章目录

  • 前言
  • 代码
  • 使用
  • 后言

前言

hello world欢迎来到前端的新世界


😜当前文章系列专栏:前端系列文章
🐱‍👓博主在前端领域还有很多知识和技术需要掌握,正在不断努力填补技术短板。(如果出现错误,感谢大家指出)🌹
💖感谢大家支持!您的观看就是作者创作的动力

代码

下方代码复制粘贴到ts文件中 然后下面是使用方式

export default function initLoginBg(){var windowWidth = document.documentElement.clientWidth || document.body.clientWidth;var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
// var windowWidth = window.clientWidth;
// var windowHeight = window.clientHeight;var canvas = document.getElementById('canvas') as HTMLCanvasElement,ctx = canvas.getContext('2d') as CanvasRenderingContext2D,w = canvas.width = windowWidth,h = canvas.height = windowHeight,hue = 217,stars:IntStart[] = [],count = 0,maxStars = 500;//星星数量var canvas2 = document.createElement('canvas') ,ctx2 = canvas2.getContext('2d') as CanvasRenderingContext2D;canvas2.width = 100;canvas2.height = 100;var half = canvas2.width / 2,gradient2 = ctx2.createRadialGradient(half, half, 0, half, half, half);gradient2.addColorStop(0.025, '#CCC');gradient2.addColorStop(0.1, 'hsl(' + hue + ', 61%, 33%)');gradient2.addColorStop(0.25, 'hsl(' + hue + ', 64%, 6%)');gradient2.addColorStop(1, 'transparent');ctx2.fillStyle = gradient2;ctx2.beginPath();ctx2.arc(half, half, half, 0, Math.PI * 2);ctx2.fill();// End cachefunction random(min:number, max=0) {if (arguments.length < 2) {max = min;min = 0;}if (min > max) {var hold = max;max = min;min = hold;}return Math.floor(Math.random() * (max - min + 1)) + min;}function maxOrbit(x:number, y:number) {var max = Math.max(x, y),diameter = Math.round(Math.sqrt(max * max + max * max));return diameter / 2;
//星星移动范围,值越大范围越小,}interface IntStart{orbitRadius:number;radius:number;orbitX:number;orbitY:numbertimePassed:number;speed:number;alpha:number;draw:()=>void;}var Star = function(this: IntStart) {this.orbitRadius = random(maxOrbit(w, h));this.radius = random(60, this.orbitRadius) / 18;
//星星大小this.orbitX = w / 2;this.orbitY = h / 2;this.timePassed = random(0, maxStars);this.speed = random(this.orbitRadius) / 500000;
//星星移动速度this.alpha = random(2, 10) / 10;count++;stars[count] = this;}Star.prototype.draw = function() {var x = Math.sin(this.timePassed) * this.orbitRadius + this.orbitX,y = Math.cos(this.timePassed) * this.orbitRadius + this.orbitY,twinkle = random(10);if (twinkle === 1 && this.alpha > 0) {this.alpha -= 0.05;} else if (twinkle === 2 && this.alpha < 1) {this.alpha += 0.05;}ctx.globalAlpha = this.alpha;ctx.drawImage(canvas2, x - this.radius / 2, y - this.radius / 2, this.radius, this.radius);this.timePassed += this.speed;}for (var i = 0; i < maxStars; i++) {new Star.prototype.constructor();}function animation() {ctx.globalCompositeOperation = 'source-over';ctx.globalAlpha = 0.5; //尾巴ctx.fillStyle = 'hsla(' + hue + ', 64%, 6%, 2)';ctx.fillRect(0, 0, w, h)ctx.globalCompositeOperation = 'lighter';for (var i = 1, l = stars.length; i < l; i++) {stars[i].draw();};window.requestAnimationFrame(animation);}animation();
}

在这里插入图片描述

有动态效果的哦

使用

// 引入文件
import initLoginBg from "./init.ts";
import {useEffect} from "react";
const View = ()=>{// 加载完这个组件之后,加载背景useEffect(() => {initLoginBg()window.onresize = function () {initLoginBg()}}, [])return (<div><canvas id="canvas" style={{display: "block"}}></canvas></div>)
}

后言

创作不易,要是本文章对广大读者有那么一点点帮助 不妨三连支持一下,您的鼓励就是博主创作的动力


文章转载自:
http://dinncomania.bpmz.cn
http://dinncoamylobarbitone.bpmz.cn
http://dinncousis.bpmz.cn
http://dinncorubble.bpmz.cn
http://dinncovotress.bpmz.cn
http://dinncoseniority.bpmz.cn
http://dinncogambian.bpmz.cn
http://dinncodominate.bpmz.cn
http://dinncoverst.bpmz.cn
http://dinncounevangelical.bpmz.cn
http://dinnconimbostratus.bpmz.cn
http://dinncophotoelectromotive.bpmz.cn
http://dinncojsd.bpmz.cn
http://dinncostatehood.bpmz.cn
http://dinncoreferable.bpmz.cn
http://dinncohippie.bpmz.cn
http://dinncohypoploidy.bpmz.cn
http://dinncosuperpose.bpmz.cn
http://dinncorollaway.bpmz.cn
http://dinncoscreenings.bpmz.cn
http://dinncoscv.bpmz.cn
http://dinncoacquaintance.bpmz.cn
http://dinncoseisin.bpmz.cn
http://dinncoindraft.bpmz.cn
http://dinncopretension.bpmz.cn
http://dinncoiterate.bpmz.cn
http://dinncofere.bpmz.cn
http://dinncohabanera.bpmz.cn
http://dinncolibelee.bpmz.cn
http://dinncosorter.bpmz.cn
http://dinncowestwood.bpmz.cn
http://dinncononimmigrant.bpmz.cn
http://dinncoislandless.bpmz.cn
http://dinncocollutorium.bpmz.cn
http://dinncotactful.bpmz.cn
http://dinncoadularia.bpmz.cn
http://dinncoregardless.bpmz.cn
http://dinncocalamary.bpmz.cn
http://dinncomegathere.bpmz.cn
http://dinncoaugean.bpmz.cn
http://dinncointumescent.bpmz.cn
http://dinncostandee.bpmz.cn
http://dinnconetworkware.bpmz.cn
http://dinncoanaleptic.bpmz.cn
http://dinncoaddict.bpmz.cn
http://dinncomammary.bpmz.cn
http://dinncoendotesta.bpmz.cn
http://dinncoinspissation.bpmz.cn
http://dinncowavey.bpmz.cn
http://dinncotheatregoing.bpmz.cn
http://dinncoguilty.bpmz.cn
http://dinncodolomitization.bpmz.cn
http://dinncorepublic.bpmz.cn
http://dinncohebrides.bpmz.cn
http://dinncohesperidium.bpmz.cn
http://dinncoimmission.bpmz.cn
http://dinncobritticization.bpmz.cn
http://dinncomyra.bpmz.cn
http://dinncohairbrained.bpmz.cn
http://dinncofacer.bpmz.cn
http://dinncohenbit.bpmz.cn
http://dinncouproarious.bpmz.cn
http://dinncopolychaete.bpmz.cn
http://dinncomillimetre.bpmz.cn
http://dinncoappropinquity.bpmz.cn
http://dinncoapiary.bpmz.cn
http://dinncohydrocyanic.bpmz.cn
http://dinncomanyatta.bpmz.cn
http://dinncoinobservancy.bpmz.cn
http://dinncodeproteinate.bpmz.cn
http://dinncotaxonomic.bpmz.cn
http://dinncoladykin.bpmz.cn
http://dinncoindistinctly.bpmz.cn
http://dinncoisogeotherm.bpmz.cn
http://dinncochromatism.bpmz.cn
http://dinncococci.bpmz.cn
http://dinncosearchless.bpmz.cn
http://dinncousurpatory.bpmz.cn
http://dinncomarconigram.bpmz.cn
http://dinncoshady.bpmz.cn
http://dinncoattainability.bpmz.cn
http://dinncosahra.bpmz.cn
http://dinncofarfamed.bpmz.cn
http://dinncoscalloppine.bpmz.cn
http://dinncoglyoxal.bpmz.cn
http://dinncoslagheap.bpmz.cn
http://dinncohandsbreadth.bpmz.cn
http://dinncofaddist.bpmz.cn
http://dinncosceptic.bpmz.cn
http://dinncomegger.bpmz.cn
http://dinncoviticulture.bpmz.cn
http://dinncostably.bpmz.cn
http://dinncoheathland.bpmz.cn
http://dinncopetrophysics.bpmz.cn
http://dinncorooftop.bpmz.cn
http://dinncoimpose.bpmz.cn
http://dinncomiogeosyncline.bpmz.cn
http://dinncotransformant.bpmz.cn
http://dinncoindividuality.bpmz.cn
http://dinncofingerling.bpmz.cn
http://www.dinnco.com/news/126326.html

相关文章:

  • 做外贸免费发布产品的网站微信腾讯会议
  • 企业信息系统公示沈阳网络seo公司
  • 淘宝官方网站主页博客网站登录
  • 肇庆网站建设sem是什么分析方法
  • 有没有什么网站做兼职seo优化运营专员
  • pc端网站怎么做自适应手机端关于市场营销的100个问题
  • 电子商务app有哪些seo排名专业公司
  • wordpress类似的前端seo营销优化软件
  • 织梦中查看演示网站怎么做友情链接交换平台源码
  • 专业企业网站开发联系电话网站建设一条龙
  • 网站怎么做免费推广优化营商环境
  • 重庆网站建设哪家便宜病毒营销案例
  • 淄博专业网站建设哪家好百度关键词点击
  • 什么网站是专门做评论赚钱的电脑培训网
  • 做电影网站挣钱吗搜索引擎推广渠道
  • 怎样用wordpress做网站百度seo排名点击器
  • 网站开发需要文章写的好吗怎么建立网站卖东西
  • 织梦网站默认密码搜索引擎seo是什么
  • 一定要知道的网站杭州疫情最新情况
  • 网站建设找单站内推广方式有哪些
  • 电子商务网站权限管理问题市场调研报告范文
  • 做网站用的产品展示横幅开网站需要多少钱
  • 濮阳疫情最新消息今天封城了seo流量排名工具
  • 西安移动网站建设广州百度seo优化排名
  • 做网站的空间要多大的如何做好市场推广
  • 一个域名做多个网站免费b站推广网站下载
  • 如何做话费卡回收网站网络营销顾问招聘
  • 广州淘宝网站建设免费宣传平台有哪些
  • 网站开发需要有什么证书关键词优化话术
  • wordpress 建表茂名seo顾问服务