Home JS special effects jQuery effects jQuery snowflake falling animation effect

jQuery snowflake falling animation effect

jQuery snowflake falling animation effect

jQuery snowflake falling animation effect

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/three.js"></script>

</head>
<body>

<script type="text/javascript">
document.writeln("<div class=\"snow\" style=\"height:1200px; background:#000;   position:fixed; left:0px; top:0px; right:0px; bottom:0px; pointer-events: none;z-index: 9999;\"><canvas width=\"1904\" height=\"913\" style=\"position: absolute;left: 0;top: 0;\"></canvas></div>");

$(function() {

if (/MSIE 6|MSIE 7|MSIE 8/.test(navigator.userAgent)) {
return
}
var container = document.querySelector(".snow");
// IE9-10 pointer-events兼容
if (/MSIE 9|MSIE 10/.test(navigator.userAgent)) {
$(container).bind('click mousemove', function(evt) {
this.style.display = 'none';
var x = evt.pageX, y = evt.pageY
if ($(document).scrollTop() > 0 || $(document).scrollTop() > 0) {
x = x - $(document).scrollLeft() + 1
y = y - $(document).scrollTop() + 1
}
evt.preventDefault();
evt.stopPropagation();
var under = document.elementFromPoint(x, y);
var evtType = evt.type === 'click' ? 'click' : 'mouseenter'
if (evt.type === 'click') {
$(under)[0].click();
} else {
$(under).trigger('mouseenter');
}
$('body').css('cursor', 'default')
this.style.display = '';
return false;
});

这是一款给人3D立体空间感的jQuery+three.js雪花飘落动画效果,canvas绘制雪花下雪动画特效。

Disclaimer

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

Realizing snowflake falling effect based on jQuery Realizing snowflake falling effect based on jQuery

05 Aug 2020

This article mainly introduces jQuery to achieve the snowflake falling effect in detail. The sample code in the article is introduced in great detail and has certain reference value. Interested friends can refer to it.

JS makes snowflake falling animation special effects JS makes snowflake falling animation special effects

06 Jun 2018

This time I will bring you JS to create special effects of falling snowflake animation. What are the precautions for making special effects of falling snowflake animation with JS? Here is a practical case, let’s take a look.

Snowflake falling animation effect implemented by native JS Snowflake falling animation effect implemented by native JS

05 May 2018

This article mainly introduces the snowflake falling animation effect implemented by native JS, involving implementation techniques related to javascript numerical operations and dynamic operation of page element attributes. Friends in need can refer to the following

Example analysis of jQuery animation effect related methods_jquery Example analysis of jQuery animation effect related methods_jquery

16 May 2016

This article mainly introduces the methods related to jQuery animation effects, and combines examples with a more detailed analysis of the common methods and related precautions used by jQuery to achieve animation effects. Friends in need can refer to the following.

jquery animation effect study notes (8 effects)_jquery jquery animation effect study notes (8 effects)_jquery

16 May 2016

This article shares a jquery animation effect study note, which provides a detailed analysis of the jquery animation effect, and explains the principles of the fade-in and fade-out effects and sliding effects. If you want to learn the jquery animation effect well, read this article patiently. I believe you will find something unexpected. Harvest.

Use jQuery animation to achieve the fade effect of elements Use jQuery animation to achieve the fade effect of elements

24 Feb 2024

Title: Achieve elegant fade-out of elements through jQuery animation. As a well-known JavaScript library, jQuery provides a wealth of animation effects and methods, which can easily achieve dynamic effects of elements in web pages. Among them, the fade-out effect of elements is one of the common web page interaction effects. The following is a specific code example to demonstrate how to achieve the elegant fade-out effect of elements through jQuery animation. First, we need to introduce the jQuery library into the HTML file, which can be linked through a CDN or downloaded locally

How to implement mouse-responsive Taobao animation effect in jQuery How to implement mouse-responsive Taobao animation effect in jQuery

05 Jun 2018

This article mainly introduces the use of jQuery to implement mouse-responsive Taobao animation effects, involving jQuery event response and dynamic operation of page element attributes. Friends in need can refer to the following

jQuery mouse hover content animation switching effect implementation code jQuery mouse hover content animation switching effect implementation code

17 Jan 2018

This article mainly introduces examples of jQuery mouse hover content animation switching effects. Has very good reference value. Let's take a look with the editor below, I hope it can help everyone.

jQuery animation display and hiding effect example demonstration (with demo source code download)_jquery jQuery animation display and hiding effect example demonstration (with demo source code download)_jquery

16 May 2016

This article mainly introduces the implementation method of jQuery animation display and hiding effects, and comes with demo source code for readers to download and refer to. It involves the display, hiding and fading effects of jQuery operating pictures. Friends in need can refer to the following

See all articles See all articles

Hot Tools

jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects

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

layui responsive animated login interface template

520 Valentine's Day confession web animation special effects

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

Cool system login page

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER

Hot Article

Pokemon Pocket: How To Play With Friends
02 Nov 2024 Mobile Game Guide
All Black Ops 6 safehouse puzzle solutions
26 Oct 2024 Mobile Game Guide
Brotato: Best Hunter Build
13 Nov 2024 Mobile Game Guide
The Sims 4: Life & Death - Guardian Tree Guide
03 Nov 2024 Mobile Game Guide