Skip to content

Commit f48fcaa

Browse files
committed
修复首页按钮箭头在小屏幕的展示问题
1 parent 16ad6e0 commit f48fcaa

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/pages/index.astro

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
147147

148148
<!-- 按钮组 -->
149149
<div class='flex flex-col gap-4 sm:flex-row sm:justify-start'>
150-
<Button title='About Me' href='/about' style='ahead' />
151-
<Button title='View Blog' href='/blog' style='ahead' />
150+
<Button title='About Me' href='/about' style='ahead' class='hero-button w-full sm:w-auto' />
151+
<Button title='View Blog' href='/blog' style='ahead' class='hero-button w-full sm:w-auto' />
152152
</div>
153153
</div>
154154
</div>
@@ -489,4 +489,17 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
489489
pointer-events: none;
490490
}
491491
}
492+
493+
/* Hero按钮的响应式样式 */
494+
.hero-button {
495+
display: flex !important;
496+
justify-content: space-between !important;
497+
}
498+
499+
@media (min-width: 640px) {
500+
.hero-button {
501+
display: inline-flex !important;
502+
justify-content: flex-start !important;
503+
}
504+
}
492505
</style>

0 commit comments

Comments
 (0)