Files
NotionNext/lib/wow.js
2024-03-06 14:57:54 +08:00

17 lines
533 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const { loadExternalResource } = require('./utils');
/**
* WOWjs动画结合animate.css使用很方便
* 是data-aos的平替 aos ≈ wowjs + animate
*/
export const loadWowJS = async () => {
await loadExternalResource('/css/wow/animate.css', 'css');
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();
}
};