mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 15:47:23 +08:00
优化动画效果,抽出组件
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// 设置歌手背景图片
|
||||
export const setBackgroundImg = (url: String) => {
|
||||
return "background-image:" + "url(" + url + ")";
|
||||
};
|
||||
// 设置动画类型
|
||||
export const setAnimationClass = (type: String) => {
|
||||
return "animate__animated " + type;
|
||||
};
|
||||
// 设置动画延时
|
||||
export const setAnimationDelay = (index: number = 6, time: number = 50) => {
|
||||
return "animation-delay:" + index * time + "ms";
|
||||
};
|
||||
Reference in New Issue
Block a user