mirror of
https://git.ddmt.top/ddmt/ddmt-tool.git
synced 2026-03-23 05:17:06 +00:00
init
This commit is contained in:
11
Tool/animate.js
Normal file
11
Tool/animate.js
Normal 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); // 清洗动画
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user