【发布时间】:2021-04-09 14:55:40
【问题描述】:
我有一个 jupyter 笔记本,我想在没有 python 代码的情况下转换为 html。
在笔记本中,我使用这段代码对齐图表和表格
from IPython.core.display import HTML
CSS = """
.output {
align-items: center;
}
"""
HTML('<style>{}</style>'.format(CSS))
事实上,这个图是正确对齐的
当我启动时:
jupyter nbconvert --to html --no-input myreport.ipynb
生成的 html 文件显示左对齐的项目。 为什么??
【问题讨论】: