【发布时间】:2021-01-11 10:46:07
【问题描述】:
有没有办法让 dbc.card 图像在 Plotly Dash Bootstrap 中居中对齐?我浏览了文档,我只能找到“顶部”和“底部”。谢谢。下面是代码sn-p:
import dash_bootstrap_components as dbc
import dash_html_components as HTML
card = dbc.Card(
[
dbc.CardImg(src="/static/images/placeholder286x180.png", top=True),
dbc.CardBody(
[
html.H4("Card title", className="card-title"),
html.P(
"Some quick example text to build on the card title and "
"make up the bulk of the card's content.",
className="card-text",
),
dbc.Button("Go somewhere", color="primary"),
]
),
],
style={"width": "18rem"},)
【问题讨论】: