The New Year is coming, add a snow effect to your website

» WordPress » The New Year is coming, add a snow effect to your website

JQuery Snowfall is a snow action library, which is divided into jQuery version and pure js version. It can easily add a small snow function to the website.

快过年了,给自己网站增加一个下雪特效吧-极客公园

preface

introduce

快过年了,给自己网站增加一个下雪特效吧-极客公园

Official website Source code

use

It is very simple to use in WordPress. Just load the js and configuration code directly. Considering that many people prefer to add them directly in the function file, just use the hook.

 function Snowfall(){ ?> <script type='text/javascript' src=' https://cdn.bootcss.com/JQuery-Snowfall/1.7.4/snowfall.min.js '></script> <script type="text/javascript">snowFall.snow(document.body, {flakeCount : 90, maxSpeed : 12, round : true, minSize: 4, maxSize:10});</ script> <? php } add_action( 'get_footer', 'Snowfall');

I don't need to say the specific use

Postscript

Cloudfall found a problem when using this js. It should be regarded as a bug, that is, when pulling to the bottom, because every snowflake is a div, the page at the bottom will tremble. But considering that the snowflake special effect is not used much, so let's do it

--End--

Post reply

Your email address will not be disclosed. Required items have been used * tagging

8 Replies to "The New Year is coming, add a snow effect to your website"

  1. The website theme is very, very good. It's perfect to modify the user center. After logging in, you can enter the user center. The user center page is great. That is, you can open the management control (change the avatar), enter the wordpress page management, and enter the user center to hide the wordpress management page, When the user logs in to the user center and clicks Manage, the wordpress page is not visible, and the user center is displayed directly. All modification operations are carried out in the user center of the website theme.