为网页添加飘雪效果

发布于 2014-01-22

新年到了,不妨为你的网站添加一点气氛,以下下雪代码,添加在网页的head标签中即可,添加在footer.php等文件中可实现全站飘雪效果。 演示地址:https://www.moenyi.cn/dh.html <script type="text/javascript" language="javascript"> (function() { function k(a, b, c) { if (a.addEventListener) a.addEventListener(b, c, false); else a.attachEvent && a.attachEvent("on" + b, c) } function g(a) { if (typeof window.onload != "function") window.onload = a; else { var b = window.onload; window.onload = function() { b(); a() } } } function h() { var a = {}; for (type in { Top: "", Left: ...