如何将两个组件并排放置在同一个 html.Div() 中?
how to place two components side by side inside same html.Div()?
我将 dbc.Label() 和 dcc.RadioItems() 放在一个 html.Div() 中,我想并排放置这些 Label 和 RadioItems()。
我在下面做了但没有用,dbc.Label 和 dcc.RadioItems 在不同的行。感谢您的帮助。
crossplot_radio_items = html.Div(
[
dbc.Label('Choose Pads',style={'display': 'inline-block'}),
dbc.RadioItems(
options=[
{"label": "AllPads", "value": "AllPads"},
{"label": "Pad74", "value": "74"},
{"label": "Pad75", "value": "75"},
{"label": "Pad77", "value": "77"},
{"label": "Pad78", "value": "78"},
],
value="AllPads",
id="conformance-crossplot-radio-items",
labelCheckedClassName="label-radio-checked",
inputClassName="label-radio-input",
inline=True,
),
style={'display': 'inline-block'}
],
)
风格外向children..
children=[],
样式={'display': 'flex'}
我将 dbc.Label() 和 dcc.RadioItems() 放在一个 html.Div() 中,我想并排放置这些 Label 和 RadioItems()。
我在下面做了但没有用,dbc.Label 和 dcc.RadioItems 在不同的行。感谢您的帮助。
crossplot_radio_items = html.Div(
[
dbc.Label('Choose Pads',style={'display': 'inline-block'}),
dbc.RadioItems(
options=[
{"label": "AllPads", "value": "AllPads"},
{"label": "Pad74", "value": "74"},
{"label": "Pad75", "value": "75"},
{"label": "Pad77", "value": "77"},
{"label": "Pad78", "value": "78"},
],
value="AllPads",
id="conformance-crossplot-radio-items",
labelCheckedClassName="label-radio-checked",
inputClassName="label-radio-input",
inline=True,
),
style={'display': 'inline-block'}
],
)
风格外向children..
children=[], 样式={'display': 'flex'}