更改 Jupyter Notebooks 中的屏幕截图格式

问题描述 投票:0回答:1

我只需使用截图工具然后粘贴即可在笔记本中显示屏幕截图。

![image-3.png](attachment:image-3.png)

但是如果我想格式化它,我就会不断收到损坏的链接。我尝试过以下方法,但不确定它出了什么问题:

<p>
<img src="C:\Users\mannf\Pictures\Screenshots\Screenshot 2023-12-13 103135.png" alt="Screenshot" style="width:600px;height:200px;border:2px solid black;border-radius:10px;">
</p>

<p>
<img src="image-4.png" alt="Image 4" style="width:600px;height:200px;">
</p>

Screenshot of whats displayed when i run the above code.

python jupyter-notebook
1个回答
0
投票

在 Markdown 中粘贴图像时不应更改语法。相反,您应该在其之前和之后添加 div。 我在此link中找到的最佳解决方案是:

<div style="max-width:500px;margin-right: auto; margin-right: 0;">
    
![image.png](attachment:image.png)
    
</div>

这个效果很好。

© www.soinside.com 2019 - 2024. All rights reserved.