Skip to content

Commit

Permalink
fix: about.astro css
Browse files Browse the repository at this point in the history
  • Loading branch information
Parsifa1 committed Nov 30, 2024
1 parent 37e8307 commit 6785d1d
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ const aboutProps = {
<AboutLayout {...aboutProps}>
<h3>云楼汐</h3>

<Image src={avtar} alt="avatar" width={180} height={180} loading={"eager"} />
<Image
src={avtar}
alt="avatar"
width={180}
height={180}
loading={"eager"}
class="float-none m-auto block w-[180px] sm:float-right sm:m-[5px]"
/>

<h4>大学二年级,热爱游戏,音乐...</h4>

Expand All @@ -27,19 +34,3 @@ const aboutProps = {
<li>未完待续......</li>
</ul>
</AboutLayout>

<style>
img {
width: 180px;
margin: 5px;
float: right; /* 默认右浮动,适用于大屏幕 */
}

@media only screen and (max-width: 750px) {
img {
float: none; /* 在小屏幕上取消浮动 */
display: block;
margin: 0 auto; /* 居中显示 */
}
}
</style>

0 comments on commit 6785d1d

Please sign in to comment.