Skip to content

Commit 3bf9ae4

Browse files
authored
fix Ubuntu 24.04 WebKit2GTK 收藏面板 CPU 飙升至 95%+ 修复
1 parent 0877d5b commit 3bf9ae4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

frontend/css/styles.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,8 +1923,8 @@ tr:last-child td {
19231923
left: 0;
19241924
right: 0;
19251925
bottom: 0;
1926-
background: rgba(0, 0, 0, 0.4);
1927-
backdrop-filter: blur(4px);
1926+
background: rgba(0, 0, 0, 0.48);
1927+
/* 移除 backdrop-filter: blur() — WebKit2GTK (Linux) 上会导致持续 95%+ CPU 占用 */
19281928
display: flex;
19291929
justify-content: center;
19301930
align-items: center;
@@ -2541,7 +2541,8 @@ tr:last-child td {
25412541
max-height: 88vh;
25422542
overflow: hidden;
25432543
border-radius: 16px;
2544-
box-shadow: 0 24px 64px -20px rgba(15, 23, 42, 0.35);
2544+
/* 降低阴影模糊半径,减少 WebKit2GTK GPU 合成开销 */
2545+
box-shadow: 0 8px 32px rgba(15, 23, 42, 0.25);
25452546
}
25462547
.fav-modal * {
25472548
box-sizing: border-box;
@@ -2768,15 +2769,14 @@ tr:last-child td {
27682769
border-radius: 2px;
27692770
background: var(--primary);
27702771
opacity: 0;
2771-
transform: scaleY(0.4);
2772-
transition: opacity 0.18s, transform 0.18s cubic-bezier(0.32, 0.72, 0, 1);
2772+
/* 移除 transform: scaleY() — WebKit2GTK 上每个伪元素创建独立合成层导致 CPU 飙升 */
2773+
transition: opacity 0.18s;
27732774
}
27742775
.fav-item:hover {
27752776
background: var(--primary-light);
27762777
}
27772778
.fav-item:hover::before {
27782779
opacity: 1;
2779-
transform: scaleY(1);
27802780
}
27812781
@keyframes favItemIn {
27822782
from { opacity: 0; transform: translateY(6px); }

0 commit comments

Comments
 (0)