Method of gradually disappearing: 1. Use fadeOut(), just set the number of milliseconds from visible to disappearing, the syntax is "$("img").fadeOut(number of milliseconds)"; 2. Use fadeTo() can set the transparency to drop to 0 in the specified number of milliseconds, the syntax is "$("img").fadeTo(number of milliseconds, 0)".
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
jquery makes the picture gradually disappear
Method 1: Use fadeOut()---make the picture gradually disappear without taking up space
fadeOut() method uses the fade out effect to hide the selected elements
Method 2: Use fadeTo()--- The placeholder makes the image gradually disappear
fadeTo() method gradually changes the opacity of the selected element to the specified value.
Just reduce the final transparency to 0.
[Recommended learning:jQuery video tutorial,web front-end video】
The above is the detailed content of How to make pictures gradually disappear with jquery. For more information, please follow other related articles on the PHP Chinese website!