首页 文章

使用Markdown在GitHub的wiki中调整图像大小

提问于
浏览
206

我在GitHub上写了一个wiki页面,我正在使用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是最好的 .

5 回答

  • 1

    仅仅在GitHub和其他降价选项上的图像的直接HTML格式化工作差不多5年后,即使使用错误的尺寸指定一些自定义尺寸,仍然会阻止图像加载 . 我更喜欢指定所需的宽度并自动计算高度,例如,

    <img src="https://github.com/your_image.png" alt="Your image title" width="250"/>
    
  • 1

    更新:

    代码(外部/内部):

    ![test](https://github.com/favicon.ico)
    

    代码(内部/外部 sizing ):

    <img src="https://github.com/favicon.ico" width="48">
    

    例:

    test


    旧答案:

    这应该工作:

    [[http://url.to/image.png |身高= 100像素]]

    资料来源:https://guides.github.com/features/mastering-markdown/

  • 314

    在GitHub上,您可以直接使用HTML而不是Markdown:

    <a href="url"><img src="http://url.to/image.png" align="left" height="48" width="48" ></a>
    

    这应该成功 .

  • 52

    在2015年12月,似乎只有链接到 github.comcloud.githubusercontent.com 等文件才能正常工作 . 在一个要点中为我工作的步骤:

    但是:GitHub的人明天可能会改变这种行为,而不会记录它 .

  • 0

    GitHub Pages现在使用kramdown作为其降价引擎,因此您可以使用以下语法:

    Here is an inline ![smiley](smiley.png){:height="36px" width="36px"}.
    

    http://kramdown.gettalong.org/syntax.html#images

    我没有在GitHub wiki上测试它 .

相关问题