【问题标题】:Why images at Github in markdown formatted file on are blurred?为什么 Github 上 Markdown 格式文件中的图像模糊?
【发布时间】:2014-10-07 06:21:55
【问题描述】:

我已将图片(jpg 和 png)上传到 github,并在此处以 markdown 格式文件使用它们(前 2 张图片): https://github.com/vasili111/testRepo/blob/master/github_question.md

第三和第四张图片用html标签插入。

在浏览器上面的链接中图像模糊。但是当我直接从浏览器访问图像时,它们并没有模糊,如下所示: https://raw.githubusercontent.com/vasili111/testRepo/master/images_for_github/3.png https://raw.githubusercontent.com/vasili111/testRepo/master/images_for_github/3.jpg

问题:

  1. 为什么图像会变得模糊?

  2. 如何在markdown格式的文本中使用图片而没有模糊效果?

【问题讨论】:

  • 为什么要投反对票?请评论拒绝投票的原因。

标签: html image git github markdown


【解决方案1】:

这是因为它们以不同的大小呈现。 markdown 格式的会被拉伸以适应屏幕;在你的情况下,它们有点太宽了,必须缩小几个像素,导致模糊效果。

你可能无能为力。

【讨论】:

  • 但是,如果我在带有 html img 标签的 Markdown 格式文件中添加图像,我还将图像的宽度和高度设置为原始图像,也会产生模糊效果。你认为在那种情况下 html img 标签的宽度和高度也会被忽略?
  • 可能。可以举个例子吗?
  • 我编辑了 github.com/vasili111/testRepo/blob/master/github_question.md 。前两个是markdown,第三个是html img标签。
  • 是的,GitHub 会自动添加一个 max-width 样式来限制您的图像。您唯一能做的就是使用较小的图像。
猜你喜欢
  • 2018-11-03
  • 1970-01-01
  • 2016-07-12
  • 2013-10-19
  • 2023-03-08
  • 1970-01-01
  • 2013-02-12
  • 1970-01-01
  • 2012-10-14
相关资源
最近更新 更多