预览页面的传送门:

LY-jilei

代码都在html里,(右键查看源代码即可得到啦)

这篇文章会有点水,哈哈哈哈~睡觉

想想还是贴个代码吧

js

document.addEventListener('touchmove', function (e) {

e.preventDefault()

})

var c = document.getElementsByTagName('canvas')[0],

x = c.getContext('2d'),

pr = window.devicePixelRatio || 1,

w = window.innerWidth,

h = window.innerHeight,

f = 90,

q,

m = Math,

r = 0,

u = m.PI*2,

v = m.cos,

z = m.random

c.width = w*pr

c.height = h*pr

x.scale(pr, pr)

x.globalAlpha = 0.6

function i(){

x.clearRect(0,0,w,h)

q=[{x:0,y:h*.7+f},{x:0,y:h*.7-f}]

while(q[1].xh||t<0) ? y(p) : t

}

document.onclick = i

document.ontouchstart = i

i()

css

canvas {

position: absolute;

top: 0;

left: 0;

z-index: 0;

width: 100%;

height: 100%;

pointer-events: none;

}

技术
今日推荐
PPT
阅读数 106
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信