theme heo wowjs

This commit is contained in:
tangly1024
2024-02-24 11:47:59 +08:00
parent a87446747b
commit 5b52bc2d7f
6 changed files with 56 additions and 50 deletions

15
lib/wow.js Normal file
View File

@@ -0,0 +1,15 @@
const { loadExternalResource } = require('./utils');
/**
* WOWjs动画结合animate.css使用很方便
* 是data-aos的平替 aos ≈ wowjs + animate
*/
export const loadWowJS = async () => {
await loadExternalResource('https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js', 'js');
// 配合animatecss 实现延时滚动动画和AOS动画相似
const WOW = window.WOW;
console.log('加载WOW动画', WOW)
if (WOW) {
new WOW().init();
}
};