This commit is contained in:
2024-09-29 16:57:15 +08:00
parent 5d4723a005
commit c1cc5b2c4e
5 changed files with 73 additions and 0 deletions

11
Tool/animate.js Normal file
View File

@@ -0,0 +1,11 @@
/**
* 动画函数
* @param {HTMLElement} event
* @param {string} classname
*/
export function animate(event, classname) {
event.classList.add(classname);
event.addEventListener('animationend', (event) => {
event.classList.remove(classname); // 清洗动画
});
}