英文:
To add images to README.md on GitHub
问题
要在GitHub的README.md文件中添加图片,可以按照以下步骤操作:
确保要添加的图片已经托管在线上。如果没有,你可以将它上传到像Imgur或GitHub本身这样的平台上。
复制要包含的图片的URL。
在你的README.md文件中,使用以下的Markdown语法来嵌入图片:
将“替代文本”替换为图片的简要描述,将“图片URL”替换为你之前复制的图片URL。
保存对README.md文件的更改并将它们提交到你的代码库。
在GitHub上查看你的README.md文件时,图片应该会显示出来。
这是正确的方法吗?
英文:
To add images to a README.md file on GitHub, you can follow these steps:
Make sure the image you want to add is hosted online. If it isn't, you can upload it to a platform like Imgur or GitHub itself.
Copy the URL of the image you want to include.
In your README.md file, use the following markdown syntax to embed the image:
![alt text](image_url)
Replace alt text with a brief description of the image, and image_url with the URL of the image you copied earlier.
Save your changes to the README.md file and commit them to your repository.
When viewing your README.md file on GitHub, the image should be displayed.
Is that a correct way to it?
答案1
得分: 1
使用懒加载的方式来显示图片
<img loading="lazy" width="30px" src="./media/images/image_name.png" alt="image_name png" />
英文:
Or like this
<img width="30px" src="./media/images/image_name.png" alt="image_name png" />
To use lazy loading for image
<img loading="lazy" width="30px" src="./media/images/image_name.png" alt="image_name png" />
答案2
得分: 0
or like html
<img src='./a.jpg' width=60%>
for example<br>
[https://github.com/ZouJiu1/zhihu_spider_selenium/blob/master/README.md](https://github.com/ZouJiu1/zhihu_spider_selenium/blob/master/README.md)
英文:
or like html
<img src='./a.jpg' width=60%>
for example<br>
https://github.com/ZouJiu1/zhihu_spider_selenium/blob/master/README.md
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论