我正在GitHub上写一个维基页面,我正在使用Markdown。
我的问题是我放了一个大的图像(这个图像在它自己的存储库中),我需要调整它的大小。
我尝试过不同的解决方案,但都不奏效:
![image](http://url.to/image.png "Title" {width=40px height=400px})
![image](http://url.to/image.png = 250x250)
![image](http://url.to/image.png = 250x)
[[http://url.to/image.png = 250x]]
有办法拿到它吗?
它最好没有HTML。
调整大小百分比宽度=50%高度=50%。例子:
<img src="https://i.imgur.com/ZWnhY9T.png" width=50% height=50%>
调整像素宽度="150"高度="280"。例子:
<img src="https://i.imgur.com/ZWnhY9T.png" width="150" height="280">
一些技巧
To get a githubusercontent link for an image, drag and drop the image into any issue, and copy/paste the url from the code that is automatically generated. Example code: ![image](https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png)
There is no way to change the size of an image if the markdown format is of the form []() - so stop looking right now! - you must use <img> instead
Another useful summary of conventions that do and don't work here
All of the above is from here
我使用了上面描述的方法。现在我使用的方法是一个类似的方式,但对我来说更简单。
首先创建并添加README。Md文件到您的项目。
然后将截图或任何需要的描述图像上传到项目主目录。
上传图像资产后,使用html直接引用这些资产,而不使用下面的链接
是这样的:
<img src="icon.jpg" width="324" height="324">
<p align="center">
<img src="screen1.png" width="256" height="455">
<img src="screen2.png" width="256" height="455">
<img src="screen3.png" width="256" height="455">
</p>
在上面的例子中,我使用段落来并排对齐图像。如果你打算使用单个图像,只需使用下面的代码
<img src="icon.jpg" width="324" height="324">
祝你有愉快的一天!
调整大小百分比宽度=50%高度=50%。例子:
<img src="https://i.imgur.com/ZWnhY9T.png" width=50% height=50%>
调整像素宽度="150"高度="280"。例子:
<img src="https://i.imgur.com/ZWnhY9T.png" width="150" height="280">
一些技巧
To get a githubusercontent link for an image, drag and drop the image into any issue, and copy/paste the url from the code that is automatically generated. Example code: ![image](https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png)
There is no way to change the size of an image if the markdown format is of the form []() - so stop looking right now! - you must use <img> instead
Another useful summary of conventions that do and don't work here
All of the above is from here