如何让 gif 图片显示在 Github 主页帖子中?
How can I make gifs show up on Github Pages posts?
我发现我可以像这样在 README.md 页面上显示 gif:

或者像这样:
<img src='https://github.com/jss367/antools/blob/gh-pages-2.3.4/assets/images/cat.gif' />
但是,当我将它们添加到博客时,这些相同的代码行不起作用 post。我需要在布局中添加一些东西吗?还是在 Github 页中关闭了?
我发现当 gif 托管在 gifs.com
上时它们会出现在博客 post 上,但托管在 Github 上时则不会。例如,这有效:
<iframe src='//gifs.com/embed/k8A5jN' frameborder='0' scrolling='no' width='1280px' height='720px' style='-webkit-backface-visibility: hidden;-webkit-transform: scale(1);' ></iframe>
但这不是:
<iframe src='https://github.com/jss367/antools/blob/gh-pages-2.3.4/assets/images/cat.gif' frameborder='0' scrolling='no' width='1280px' height='720px' style='-webkit-backface-visibility: hidden;-webkit-transform: scale(1);' ></iframe>
我想直接在 github.com 上托管它。
您的 link 转到网页。使用直接 link 或适当的目录
试试这个:
<img src='https://github.com/jss367/antools/blob/gh-pages-2.3.4/assets/images/cat.gif?raw=true' />
我发现我可以像这样在 README.md 页面上显示 gif:

或者像这样:
<img src='https://github.com/jss367/antools/blob/gh-pages-2.3.4/assets/images/cat.gif' />
但是,当我将它们添加到博客时,这些相同的代码行不起作用 post。我需要在布局中添加一些东西吗?还是在 Github 页中关闭了?
我发现当 gif 托管在 gifs.com
上时它们会出现在博客 post 上,但托管在 Github 上时则不会。例如,这有效:
<iframe src='//gifs.com/embed/k8A5jN' frameborder='0' scrolling='no' width='1280px' height='720px' style='-webkit-backface-visibility: hidden;-webkit-transform: scale(1);' ></iframe>
但这不是:
<iframe src='https://github.com/jss367/antools/blob/gh-pages-2.3.4/assets/images/cat.gif' frameborder='0' scrolling='no' width='1280px' height='720px' style='-webkit-backface-visibility: hidden;-webkit-transform: scale(1);' ></iframe>
我想直接在 github.com 上托管它。
您的 link 转到网页。使用直接 link 或适当的目录
试试这个:
<img src='https://github.com/jss367/antools/blob/gh-pages-2.3.4/assets/images/cat.gif?raw=true' />