<script> <br><br>//width:400, <br>//height:300, <br>//pic:' water-drop.png', //The default rain picture is water-drop.png <br>//speed:1000, //Rain speed<br>//num:100, //Density of raindrops<br> //dir:['right',160], //The default direction of rain is the deviation of raindrops to the right<br><br><br>$(function(){ <br>$(".container" ).Rain({width:'500',dir:['right',100],speed:3000,num:100,func:back_func}); <br><br><br>}) <br>var i =0; <br>function back_func(d){ <br>if(parseInt($(".box").position()['left'] $(".box").width())> d&&d>parseInt($(".box").position()['left'])){ <br>if(i>$(".box").height()){ <br>$(". box .water").animate({height:0}); <br>i=0; <br>return; <br>} <br>$(".box .water").animate({height:i }); <br>} <br><br>if(parseInt($(".box2").position()['left'] $(".box2").width())>d&&d>parseInt ($(".box2").position()['left'])){ <br>if(i>$(".box2").height()){ <br>$(".box2 .water ").animate({height:0}); <br>i=0; <br>return; <br>} <br>$(".box2 .water").animate({height:i }); <br>} <br>} <br></script>
html
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn