【问题标题】:How to give space between two dcc components in Python Dash?如何在 Python Dash 中的两个 dcc 组件之间留出空间?
【发布时间】:2020-07-28 18:03:04
【问题描述】:

Dash 中 &nbsp(空格)的 HTML 等效项是什么?

html.Div(
    [
      dcc.Input(),
      <add horizontal space here> 
      dcc.Input()
    ]
)

【问题讨论】:

  • 你检查过这些12 了吗?

标签: python plotly plotly-dash plotly-python


【解决方案1】:

如果你想在组件之间添加一些空间,你可以简单地使用 CSS-properties:

html.Div(
    [
      dcc.Input(),
      dcc.Input(style={"margin-left": "15px"})
    ]
)

这会在您的第二个输入的左侧添加一个边距。

查看 Plotly Dash 文档和 CSS 文档中关于边距的布局部分:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-28
    • 1970-01-01
    • 1970-01-01
    • 2015-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多