可以通过创建格式为 username/username
的存储库来创建 github 配置文件 README。自述文件将显示在用户个人资料中的固定存储库上方。
但是,有些图片不显示,从一些人工测试来看,它似乎与尺寸或图片文件大小有关。
图像必须满足什么规范才能在原本为空的配置文件 README 中正确显示?也就是说,一个配置文件自述文件仅包含:
<img src="https://github.com/favicon.ico" height="240" width="480">
注意:这是加载图片失败时 README 的显示方式:
最佳答案
解决方案(通过来自 github 支持的电子邮件):
If you drag and drop an image into a pull request or issue comment it will automatically generate a link to the file on githubusercontent.
这会产生完美运行的代码:
![](https://user-images.githubusercontent.com/12915136/87480122-ab9e5e00-c5fa-11ea-82b1-b4d3340b5c27.png)
在原始代码中只有一些图像会按预期显示的原因是由于错误(此错误已被报告)
关于html - 在 github 配置文件 README 中显示图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62893869/