Commit 113b44c6 authored by liujiangnan's avatar liujiangnan

feat: 修复样式问题

parent 998aca24
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
body { body {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
background-color: #f5f5f5; background-color: #f5f5f5;
overflow: hidden; overflow: auto;
} }
#app { #app {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
position: relative; position: relative;
overflow: hidden;
} }
.book-container { .book-container {
...@@ -23,13 +24,16 @@ body { ...@@ -23,13 +24,16 @@ body {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
overflow: hidden;
} }
.page-image { .page-image {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
object-fit: contain; width: auto;
height: auto;
display: block; display: block;
object-fit: contain;
} }
.image-container { .image-container {
...@@ -39,6 +43,7 @@ body { ...@@ -39,6 +43,7 @@ body {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
overflow: hidden;
} }
/* 多页显示样式 */ /* 多页显示样式 */
...@@ -50,6 +55,9 @@ body { ...@@ -50,6 +55,9 @@ body {
flex: 1; flex: 1;
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100%;
min-height: 0;
min-width: 0;
} }
/* 多页时的容器样式 */ /* 多页时的容器样式 */
...@@ -75,29 +83,19 @@ body { ...@@ -75,29 +83,19 @@ body {
width: auto; width: auto;
} }
.page-image {
max-width: 100%;
max-height: 100%;
object-fit: contain;
display: block;
}
/* 多页时的样式 */ /* 多页时的样式 */
.page-image.multi-page { .page-image.multi-page {
width: 100%;
height: 100%;
object-fit: contain;
margin: 0;
padding: 0;
}
/* 当只有一页时的样式 */
.page-image:not(.multi-page) {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
width: auto;
height: auto;
margin: 0;
padding: 0;
object-fit: contain; object-fit: contain;
} }
.highlight-rect { .highlight-rect {
position: absolute; position: absolute;
border: 2px dashed #007bff; border: 2px dashed #007bff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment