Skip to content

Commit 8f6741c

Browse files
committed
更新信息,修复手机端:2026-06-18 22:23
1 parent d54ae2a commit 8f6741c

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/components/Hero.astro‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ const { src = '/astronaut-hero-img.webp' }: Props = Astro.props
1212

1313
<section class="hero my-24">
1414
<div class="container">
15-
<div class="flex flex-col items-center gap-8 lg:grid lg:grid-cols-2 lg:gap-24">
15+
<div class="grid grid-cols-1 items-center gap-12 lg:grid-cols-2 lg:gap-24">
1616
<div class="flex flex-col items-center gap-6 md:items-start">
17-
<!-- Logo 图片,移动端也显示,缩小尺寸适应屏幕 -->
18-
<img src="/img/logo.jpg" alt="花江安全局 Logo" class="w-32 md:w-40 lg:w-48 h-auto rounded-2xl shadow-lg" />
1917
<h1 class="text-center text-4xl md:text-6xl lg:text-8xl md:text-left">
2018
<span class="text-gradient">花江安全</span>
2119
</h1>
@@ -45,7 +43,8 @@ const { src = '/astronaut-hero-img.webp' }: Props = Astro.props
4543
</Link>
4644
</div>
4745
</div>
48-
<Image class="hidden lg:block" src={src} alt="" decoding="async" width={800} height={600} loading="eager" />
46+
<!-- 宇航员图片在所有屏幕上都显示,手机端放在文字下方 -->
47+
<Image class="mx-auto w-3/4 lg:w-full" src={src} alt="" decoding="async" width={800} height={600} loading="eager" />
4948
</div>
5049
</div>
5150
</section>

0 commit comments

Comments
 (0)