【发布时间】:2022-10-17 17:48:06
【问题描述】:
我正在使用 IPython.display 库在 Jupyter 笔记本中显示图像。
activeViewFromArray = ipywidgets.Output()
with activeViewFromArray:
display(PIL.Image.fromarray(array))
如何向其中添加css 以使此显示调用生成的<img> 的宽度为父容器的100%?
如果我检查页面,我可以通过将 <img> 标记的样式更新为 width:100% 轻松地手动使其 100%
但是,如果我只是在 css 文件中设置它,所有 <img> 标记都会获得 100% 的宽度。
【问题讨论】:
标签: python css jupyter-notebook