jQuery orange juice bubble animation special effects
代码片段:
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);
}
}
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
16 May 2016
This article mainly introduces jQuery animation special effects, and describes in detail the implementation method of jQuery animation special effects. It is very practical. Friends who need it can refer to it.
28 Nov 2017
In addition to asynchronous, what we need to use most in jquery is animation and special effects. If we want to give users a better experience, jquery is the best choice. Let us take a look at the detailed explanation of jquery animation and special effects.
16 May 2016
This article mainly introduces the usage of JQuery animation and special effects. It analyzes the usage techniques of display and hiding, sliding, fading in and out and custom animation with examples. Friends who need it can refer to it below.
16 May 2016
This article mainly introduces the special effects of jquery slideshow with animation effect. It is recommended to everyone. Friends who need it can refer to it.
16 May 2016
This article mainly introduces jQuery to implement the "back to top" animation special effects code for chapter anchor points. It involves related techniques of jQuery responding to mouse events and scrolling to achieve page scrolling. It has certain reference value. Friends who need it can refer to it.
16 May 2016
This article will collect 10 awesome jQuery image slider animations for you, all carefully selected by the editor. I hope these ready-made jQuery plug-ins will save you a lot of development time.
16 May 2016
This article mainly introduces the implementation of click animation pop-up form based on jquery css3. The pop-up form does not have any covering layer. It is often used in web front-end program development. Friends who need it can refer to it.
26 Apr 2023
In front-end development, we often need to use jQuery to handle some interactive effects and animation effects, such as animation effects when the mouse is hovering, animation effects when the page is loading, etc. But sometimes we need to set a delay time so that these effects can be better expressed. So, how does jQuery set a delay? This article will introduce this issue in detail. 1. Delay method in jQuery In jQuery, delay effect can be easily achieved by using the delay() method. The delay() method can be used
16 May 2016
jQuery UI CSS Framework is a style framework in jQuery UI. You can use jQuery Theme roller to generate the css style effects you want. We can use some frameworks of jQuery UI to develop plug-ins based on jQuery UI CSS Framework effects.
Hot Tools
jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects
A very popular jQuery Valentine's Day confession fireworks animation special effect on Douyin, suitable for programmers and technical geeks to express their love to the girl they love. No matter you choose to be willing or not, you have to agree in the end.
layui responsive animated login interface template
layui responsive animated login interface template
520 Valentine's Day confession web animation special effects
jQuery Valentine's Day Confession Animation, 520 Confession Background Animation
Cool system login page
Cool system login page
HTML5 tape music player-CASSETTE PLAYER
HTML5 tape music player-CASSETTE PLAYER