【文件属性】:
文件名称:jQuery橙汁水汽泡动画特效.zip
文件大小:34KB
文件格式:ZIP
更新时间:2022-07-31 04:26:26
js特效-jQuery橙汁水汽泡动画特效
代码片段:
class Bubble {
constructor(target, i) {
this.bubble = document.createElement("div");
this.bubble.classList.add("bubble");
this.x = Math.floor(Math.random() * innerWidth);
this.y = Math.floor(Math.random() * innerHeight);
this.scale = Math.random();
this.pos = Math.round(Math.random());
this.bubble.style.top = `${this.y}px`;
this.bubble.style.left = `${this.x}px`;
this.bubble.style.transform = `translateZ(${
this.pos ? "" : "-"
}${this.scale.toFixed(2) * 1000}px)`;
setTimeout(() => {
target.appendChild(this.bubble);
}, i * 50);
setTimeout(floatOn.bind(null, { el: this.bubble, x: this.x }), i * 50);
}
}
【文件预览】:
jQuery橙汁水汽泡动画特效
----php中文网下载站.url(114B)
----php中文网免费下载站.txt(219B)
----js()
--------jquery.min.js(91KB)
----index.html(3KB)