From d0ce5231d6da7f82816c28a2f4009ad01642d32c Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 9 Dec 2025 01:37:34 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BC=98=E5=8C=96=E7=94=B5=E5=AD=90=E4=B9=A6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8FPC+mobile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/book/index.scss | 27 ++++++++++++++++++++------- src/pages/index/index.scss | 1 + 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/pages/book/index.scss b/src/pages/book/index.scss index dba6f48..d1b285c 100644 --- a/src/pages/book/index.scss +++ b/src/pages/book/index.scss @@ -69,10 +69,16 @@ // color: #72d572; } + // img { + // max-width: 100%; + // height: auto; + // /* 保持图像的纵横比 */ + // } + img { - max-width: 100%; - height: auto; - /* 保持图像的纵横比 */ + /* 如果需要让 img 当 flex item 居中,不需要额外样式 */ + display: block; + margin: 0 auto; } .at-drawer__content { @@ -101,7 +107,6 @@ flex-direction: column; align-items: center; justify-content: center; - // background-color: yellow; .book_left { width: 400px; @@ -110,9 +115,12 @@ } .markdown-body { - width: 100%; - max-width: 1400px; - font-size: 22px; + // width: 100%; + width: 700px; + // max-width: 1400px; + // font-size: 22px; + font-size: 18px; + // color: red; // background-color: #72d572; } @@ -132,4 +140,9 @@ // background-color: yellow; } } + .Book img { + /* 如果需要让 img 当 flex item 居中,不需要额外样式 */ + display: block; + margin: 0 auto; + } } diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index e2fb8a5..9ebe71f 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -192,6 +192,7 @@ align-items: center; justify-content: center; // background-color: aqua; + // color: red; position: relative; .index-book {