# JS樱花飘落效果
本文用极简的方式,用一个js脚本来给网站添加樱花飘落效果,分为两种样式:
# 方法1.CDN引用
在线引入1:
~~~html
<!--樱花特效在线引入-->
<script src="https://files.cnblogs.com/files/quaint/sakuraPlus.js"></script>
~~~
在线引入2:
~~~html
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/wsqstar/ResHosting@0.031/build/js/Sakura.js"></script>
~~~
# 方法2.自建JS
## [sakura_fall1](https://github.com/WRXinYue/sakura_fall/tree/main/sakura_fall1)
效果展示:
![image-20220806162057541](https://cdn.jsdelivr.net/gh/WRXinYue/PictureCDN/img/image-20220806162057541.png)
演示链接:[樱花飘落动画1](https://wrxinyue.github.io/sakura_fall/sakura_fall1/)
## [sakura_fall2](https://github.com/WRXinYue/sakura_fall/tree/main/sakura_fall2)
效果展示:
![image-20220806164350402](https://cdn.jsdelivr.net/gh/WRXinYue/PictureCDN/img/image-20220806164350402.png)
演示链接:[樱花飘落动画2](https://wrxinyue.github.io/sakura_fall/sakura_fall2/)