【问题标题】:Is it impossible to put two images side by side in Jupyter notebook markdown using HTML?使用 HTML 在 Jupyter notebook markdown 中并排放置两个图像是不可能的吗?
【发布时间】:2018-12-02 01:10:20
【问题描述】:

我正在使用 Jupyter 笔记本,我想使用 Markdown 块并排显示图像。对于图像,

<img src="image1.png" width="400">

向我展示了一张图片,但我想知道是否有任何方法可以使用 Markdown 块并排放置图片。


试试

我尝试了以下方法:

<style type="imgContainer">
    float:left;
</style>

<div class="image12">
    <div class="imageContainer">
        <img src="../EyeTracking_data/Figures/Freq.png" width="200" />
    </div>
    <div class="imageContainer">    
        <img src="../EyeTracking_data/Figures/Freq.png" width="200"/>
    </div>
</div>

但这仅显示一个在顶部,另一个在底部的图。

有什么办法吗?

【问题讨论】:

    标签: jupyter-notebook


    【解决方案1】:
    from IPython.display import HTML, display
    display(HTML("<table><tr><td><img src='img1'></td><td><img src='img2'></td></tr></table>"))
    

    How to include two pictures side by side in Markdown for IPython Notebook (Jupyter)?

    【讨论】:

      猜你喜欢
      • 2016-02-12
      • 2023-03-13
      • 2020-02-15
      • 2020-01-15
      • 1970-01-01
      • 2018-12-21
      • 2016-12-11
      • 1970-01-01
      相关资源
      最近更新 更多