mirror of
https://github.com/afoim/fuwari.git
synced 2026-01-31 00:53:19 +08:00
style(friends): 优化好友卡片过渡动画性能
明确指定过渡属性以提高性能,添加transform提升硬件加速
This commit is contained in:
@@ -46,11 +46,12 @@ const friends = Object.values(
|
||||
<style>
|
||||
.friend-card {
|
||||
@apply flex flex-col gap-1 p-4 rounded-lg bg-[var(--card-bg)] border border-black/10 dark:border-white/10 hover:border-black/20 dark:hover:border-white/20 hover:bg-black/5 dark:hover:bg-white/5;
|
||||
transition-property: all;
|
||||
transition-property: background-color, border-color, scale;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 0.15s;
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.friend-card:active {
|
||||
|
||||
Reference in New Issue
Block a user