Stackoverflow热门问题(十四)-改变Markdown图片的大小的方式
stackoverflow热门问题目录如有翻译问题欢迎评论指出,谢谢。
改变Markdown图片的大小的方式
- cantdutchthis asked:
- 我刚开始用markdown,感觉不错,不过有个小问题困扰着我:怎样改变markdown图片的大小?
- 文档只给出了下面的图片使用例子
![drawing](drawing.jpg)
- 以及有没有办法能让图片居中?希望是用标准markdown语法实现的,而不是GitHub实现的。
- Answers:
- Tieme - vote: 1254
- 在markdown里面使用html标签:
<img src="drawing.jpg" alt="drawing" width="200"/>
- 或者使用
style
属性(GitHub不支持) <img src="drawing.jpg" alt="drawing" style="width:200px;"/>
- 或者自定义CSS文件像这篇回答里说的:Markdown and image alignment
![drawing](drawing.jpg)
- 在其它文件的CSS:
img[alt=drawing] { width: 200px; }
- prosseek - vote: 662
- kushdilip - vote: 405
- The accepted answer here isn't working with any Markdown editor available in the apps I have used till date like Ghost, Stackedit.io or even in the StackOverflow editor. I found a workaround here in the StackEdit.io issue tracker.
- 这段看不懂,机翻也看不懂,不过下面这句我看懂了,所以问题不大。
- 直接使用HTML语法就好了,非常完美:
<img src="http://....jpg" width="200" height="200" />
- The accepted answer here isn't working with any Markdown editor available in the apps I have used till date like Ghost, Stackedit.io or even in the StackOverflow editor. I found a workaround here in the StackEdit.io issue tracker.
- Tieme - vote: 1254
Changing image size in Markdown
- cantdutchthis asked:
- I just got started with Markdown. I love it, but there is one thing bugging me: How can I change the size of an image using Markdown?
- 我刚开始用markdown,感觉不错,不过有个小问题困扰着我:怎样改变markdown图片的大小?
- The documentation only gives the following suggestion for an image:
- 文档只给出了下面的图片使用例子
![drawing](drawing.jpg)
- If it is possible I would like the picture to also be centered. I am asking for general Markdown, not just how GitHub does it.
- 以及有没有办法能让图片居中?希望是用标准markdown语法实现的,而不是GitHub实现的。
- I just got started with Markdown. I love it, but there is one thing bugging me: How can I change the size of an image using Markdown?
- Answers:
- Tieme - vote: 1254
- You could just use some HTML in your Markdown:
- 在markdown里面使用html标签:
<img src="drawing.jpg" alt="drawing" width="200"/>
- Or via
style
attribute (not supported by GitHub)- 或者使用
style
属性(GitHub不支持)
- 或者使用
<img src="drawing.jpg" alt="drawing" style="width:200px;"/>
- Or you could use a custom CSS file as described in this answer on Markdown and image alignment
- 或者自定义CSS文件像这篇回答里说的:Markdown and image alignment
![drawing](drawing.jpg)
- CSS in another file:
- 在其它文件的CSS:
img[alt=drawing] { width: 200px; }
- You could just use some HTML in your Markdown:
- prosseek - vote: 662
- kushdilip - vote: 405
- The accepted answer here isn't working with any Markdown editor available in the apps I have used till date like Ghost, Stackedit.io or even in the StackOverflow editor. I found a workaround here in the StackEdit.io issue tracker.
- 这段看不懂,机翻也看不懂,不过下面这句我看懂了,所以问题不大。
- The solution is to directly use HTML syntax, and it works perfectly:
- 直接使用HTML语法就好了,非常完美:
<img src="http://....jpg" width="200" height="200" />
- The accepted answer here isn't working with any Markdown editor available in the apps I have used till date like Ghost, Stackedit.io or even in the StackOverflow editor. I found a workaround here in the StackEdit.io issue tracker.
- Tieme - vote: 1254
共有 0 条评论