html - github页面和相关链接中的图像

标签 html github

我创建了一个用户的 github 页面。

现在,假设我在存储库的根目录中有一个图像文件,位置为 Images/Emoticons/Cool.png

我尝试将该图像插入到我的主 Index.html 中文件。
我写 -
- <img src="\images\emoticons\cool.png">在线和离线都没有显示
- <img src="images\emoticons\cool.png">没有在线显示但我可以离线查看图像
- <img src="..\images\emoticons\cool.png">在线和离线都没有显示

应该怎么办?

最佳答案

由于该站点由 Linux 服务器提供服务,因此路径区分大小写。

为了完成这项工作,请在提供的 url 中将 emoticons 替换为 Emoticons

Screenshot of the repository

此外,在 URL 中,将反斜杠 (\) 替换为正斜杠 (/)。

下面的 HTML 代码应该可以正确显示图像

<img src="images/Emoticons/cool.png" alt="hi" class="inline"/>

关于html - github页面和相关链接中的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17141612/

相关文章:

css - Github.io 图片链接

authentication - 为嵌入式内容编辑/版本控制提供网络登录的服务

javascript - 如何创建纯色填充的 html 条形图?

c# - 图像按钮中的 asp.net 图像保持静止

html - 为什么 IE9 将我的 HTML5 block 级元素显示为内联?

GitHub token - 限制访问

github - 如何为 Cygwin 安装 Git?

github - 在 "github pages"站点内查看 .rst

html - 填充和边距为 0px 时文档顶部的空白

html - pie.htc 没有修复 css3 问题