Skip to content

Commit

Permalink
正确限制图片最大宽度
Browse files Browse the repository at this point in the history
  • Loading branch information
movsb committed Dec 6, 2024
1 parent 0b33e3d commit 24f6227
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions theme/blog/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ img, svg {
// 注意:iframe 没法自动响应式大小,需要手动根据 size 计算 aspect-ratio。
// 参考:service/modules/renderers/media_size
iframe, img, svg, video {
max-width: 500px;
max-width: min(500px, 100%);
height: unset;
&.too-high {
max-width: unset;
max-height: 500px;
max-width: unset;
width: unset !important;
}
&.too-wide {
max-width: 500px;
max-width: min(500px, 100%);
max-height: unset;
height: unset !important;
}
Expand Down

0 comments on commit 24f6227

Please sign in to comment.