是否可以在一个GitHub存储库的README文件中放置一个截图?语法是什么?


当前回答

对我来说,最好的办法是

用github上的存储库创建一个新问题,然后以gif格式上传文件。要将视频文件转换为gif格式,您可以使用这个网站http://www.online-convert.com/ 提交新创建的问题。 复制上传文件的地址 最后在你的README文件中放入!

希望这能有所帮助。

其他回答

方法1->降价方式

![Alt Text](https://raw.github.com/{USERNAME}/{REPOSITORY}/{BRANCH}/{PATH})

方法2->HTML方式

<img src="https://link(format same as above)" width="100" height="100"/>

or

<img src="https://link" style=" width:100px ; height:100px " />

如果你不想样式你的图像,即调整大小,删除样式部分

从2021年3月起,现在支持:

将文件附加到标记文件

You can now attach files, including images, to markdown files while you're editing them in the web. This works just like file attachments in issues and pull requests and supports the same file types. Just drag and drag, click and select, or paste. Note: If you add an image to a markdown file, anyone can view the anonymized image URL without authentication, even if the markdown file is in a private repository. To keep images private, serve them from a private network or server that requires authentication. For more information on anonymized URLs see "About anonymized image URLs".

在存储库中从上传文件选项添加图像,然后在README文件中

![Alt text]("enter image url of repositoryhere") 

请休息这四步, 这对我很有效

1-在GitHub上创建一个新问题。 拖放图片到评论栏或上传照片。 3 .等待上传完成。 4 .复制URL并在GitHub上的Markdown文件中使用它(在存储库的自述中使用生成的URL)。

使用位于/screen-shots目录中的图像。外部的<div>允许图像被定位。填充是使用<img width="desired-padding" height="0">实现的。

<div align="center">
        <img width="45%" src="screen-shots/about.PNG" alt="About screen" title="About screen"</img>
        <img height="0" width="8px">
        <img width="45%" src="screen-shots/list.PNG" alt="List screen" title="List screen"></img>
</div>