优化图片显示

This commit is contained in:
2020-09-07 20:19:03 +08:00
parent a2888e2f37
commit 601a444da2
3 changed files with 16 additions and 12 deletions

View File

@@ -58,3 +58,18 @@
padding: 0 .1rem;
margin-left: .15rem;
}
.img-link {
display: inline-block;
}
.img-link img {
max-width: 100%;
max-height: 2000px;
}
.left-container .img-link img {
max-height: 500px;
}

View File

@@ -136,7 +136,7 @@ export class HighlightedMarkdown extends Component {
href={normalize_url(node.attribs.src)}
target="_blank"
rel="noopenner noreferrer"
className="ext-link"
className="ext-link img-link"
key={index}
>
<img

View File

@@ -193,17 +193,6 @@
overflow-x: auto;
}
.box-content img {
max-width: 100%;
max-height: 2000px;
display: block;
margin: 0 auto;
}
.left-container .box-content img {
max-height: 500px;
}
.left-container .box-content {
max-height: calc(100vh + 15em);
overflow-y: hidden;