From 21322a433902ddad8119d5c05b5f369b45489d0d Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 25 Jun 2026 11:10:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(card):=20=E6=8F=90=E5=8D=87=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E5=B1=82=20z-index=20=E4=BD=BF=E5=B0=81=E9=9D=A2?= =?UTF-8?q?=E5=9B=BE=E5=8F=AF=E7=82=B9=E5=87=BB=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 封面完整图 .blur-img-full 在全局 CSS 有 z-index:1 (input.css:611), 盖在原 z-0 的覆盖层 Link 之上,导致 hover 封面命中 而非 : 光标非 pointer 且点击不跳转。 将覆盖层提到 z-[2](>封面图 1,<标签 10),命中 后光标与点击一并解决, 标签 stop_propagation 与 hover 缩放不受影响。 --- src/components/post_card.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/post_card.rs b/src/components/post_card.rs index 3f83ba3..1e68eef 100644 --- a/src/components/post_card.rs +++ b/src/components/post_card.rs @@ -79,9 +79,12 @@ pub fn PostCard(post: PostListItem) -> Element { } } } - // 覆盖层链接:铺满卡片,承担整卡跳转。z-0 位于标签 (z-10) 之下。 + // 覆盖层链接:铺满卡片,承担整卡跳转。 + // z-[2] 高于封面完整图 (.blur-img-full z-index:1, input.css:611), + // 使鼠标 hover 封面时命中本 而非 :光标变 pointer 且点击可跳转; + // 仍低于标签 (z-10),标签独立点击(stop_propagation)不受影响。 Link { - class: "absolute inset-0 z-0", + class: "absolute inset-0 z-[2]", aria_label: "post link to {post.title}", to: Route::PostDetail { slug: post_slug }, }