web前端|js教程
JS,跟随,鼠标,闪烁,转动,色块,方法
web前端-js教程
本文实例讲述了JS实现跟随鼠标闪烁转动色块的方法。分享给大家供大家参考。具体实现方法如下:
国内外源码分享网站,vscode怎么回到上一步,ubuntu饥荒联机,怎么存图片到tomcat,xpath定位 爬虫,php脚本不执行,中国seo代理加盟网络平台lzw
if (document.all){
colours=new Array(ff0000, 0ff00,3366ff,ff00ff,ffa500,ffffff,fff000)
amount=colours.length;
YgetDelay=0,XgetDelay=0,Ydelay=0,Xdelay=0,step=0.2,currStep=0,my=0,mx=0;
document.write(
);
for (i=0; i < amount; i++)
document.write(
.
);
document.write(
);
ini=1;
gstep=1;
function iMouse(){
my=event.y;mx=event.x;
}
document.onmousemove=iMouse
function dim(){
ini-=gstep;
dt=setTimeout(dim(),10);
if (ini < 2){
clearTimeout(dt);
glow();
}
}
function glow(){
ini+=gstep;
gt=setTimeout(glow(),10);
if (ini > 14){
clearTimeout(gt);
dim();
}
}
function stars(){
ie.style.top=document.body.scrollTop;
for (i=0; i < amount; i++)
{
var layer=iestars[i].style;
layer.filter=glow(color=+colours[i]+, strength=+ini+);
layer.top= Ydelay+100*Math.sin((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
layer.left=Xdelay+180*Math.cos((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
}
currStep+=step;
}
function delay(){
Ydelay = YgetDelay+=(my-YgetDelay)*1/20;
Xdelay = XgetDelay+=(mx-XgetDelay)*1/20;
stars();
setTimeout(delay(),10);
}
delay();
glow();
}
//-->
网络故障报修系统源码,ubuntu对应的动物,tomcat怎么接入数据库,不建议学爬虫,减少内存消耗 php-cli,网上seo布局lzw
简单的注册登录php源码下载,vscode没法在谷歌运行,ubuntu 打开so,tomcat写入到服务,爬虫箱定时,php 数组循环插入数据,seo快排市场价,熊猫办公网站源码不带数据,kesioncms企业模板lzw