Skip to content

Commit 7aa2035

Browse files
committed
Improve button visibility with consistent shadow
1 parent d44d0c1 commit 7aa2035

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/components/control/BackToTop.astro

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { Icon } from "astro-icon/components";
3434
transform: translateX(5rem)
3535
pointer-events: auto
3636
transition: box-shadow 1s ease-in-out
37+
box-shadow: 0 0 12px color-mix(var(--primary) 60%, transparent)
3738

3839
i
3940
font-size: 1.75rem
@@ -42,14 +43,11 @@ import { Icon } from "astro-icon/components";
4243
transform: translateX(5rem) scale(0.9)
4344
opacity: 0
4445
pointer-events: none
46+
box-shadow: none
4547

4648
&:active
4749
transform: translateX(5rem) scale(0.9)
4850

49-
@media (max-width: 1920px)
50-
.back-to-top-btn
51-
box-shadow: none
52-
5351
// 手机端隐藏返回顶部按钮
5452
@media (max-width: 768px)
5553
.back-to-top-wrapper

0 commit comments

Comments
 (0)