Molunerfinn / hexo-theme-melody

:musical_keyboard:A simple & beautiful & fast theme for Hexo.
https://molunerfinn.com
Other
1.59k stars 213 forks source link

图片不会自适应 #285

Closed sheey11 closed 4 years ago

sheey11 commented 4 years ago

I want to create a new issue

Melody Information

Melody Version: dev 最新

Platform: macOS

Browser: Chrome

Expected behavior

正常显示。

Screen Shot 2020-06-14 at 10 21 26 AM

Actual behavior

图片没有自适应。

Screen Shot 2020-06-14 at 10 21 57 AM

Steps to reproduce the behavior

在反复试了几次 git bisect 之后,都显示是 0bafb49(v 1.7.0 推出)的问题。
我也觉得很奇怪,但是 git reset --hard 前后试了下,确实就是这个 commit 的问题。

Screen Shot 2020-06-14 at 10 25 43 AM

这也太玄学了,这两个文件应该不会对 css 有影响。

Molunerfinn commented 4 years ago

回头会看看是什么原因,这段时间比较忙

plain-dev commented 4 years ago

我也遇到了这个问题,暂时通过修改 CSS 解决了

在这里加入了以下代码

https://github.com/Molunerfinn/hexo-theme-melody/blob/3f68b823abeeb4b0c6c916691a3475b91b7f63d7/source/css/_layout/post.styl#L237

img
  max-width: 100%
sheey11 commented 4 years ago

这条 css 规则是有的 https://github.com/Molunerfinn/hexo-theme-melody/blob/3f68b823abeeb4b0c6c916691a3475b91b7f63d7/source/css/_layout/post.styl#L264 而且实际上最后一次修改的人是我XD 找了下原因,以为是 .content 类名改了,导致不生效,结果压根就没有过这个类 不知道为啥当时哈哈哈哈哈,我开个 pr 修了吧

Molunerfinn commented 4 years ago

@Sheey11 @plain-dev 赞

guoshicheng commented 4 years ago

除了post页面,page页面的图片也不能自适应 @Sheey11

qianguyihao commented 4 years ago

是的,文章里的图片没有自适应,麻烦博主抽空解决下。