Is it possible to add border to image in GitHub markdown?
·
Answer a question
I need to add border to the image in GitHub README.md file. This is how image should be embeded:

I have tried to wrap image with the table:
|--------------------------------|
||
but it is not possible to create table without header.
I have also tried to include image as html tag:
<img src="/images/logo.png" style="border: 1px solid black" />
but without success. Is there any way how to do this?
Answers
It's hacky and not always pretty, but surround the image with a <kbd>
tag.
Before
<img src="https://devpress-image.s3.cn-north-1.jdcloud-oss.com/a/5b21457128_CtiyS.jpg">
After
<kbd>
<img src="https://devpress-image.s3.cn-north-1.jdcloud-oss.com/a/5b21457128_CtiyS.jpg">
</kbd>
And it renders like this:
Surrounding the markdown image syntax might not work for some markdown implementations. If the following does not work
<kbd></kbd>
Try embedding the image as an HTML <img>
tag instead
<kbd><img src="https://example.com/image.png" /></kbd>
更多推荐
所有评论(0)