python dash 中使用bootstrap排版(栅格系统)


import dash_bootstrap_components as dbc
import dash_html_components as html

app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])

row = html.Div(
    [
        dbc.Row(dbc.Col([html.Div("A single, half-width column")], width=6)),
        dbc.Row(
            dbc.Col([html.Div("An automatically sized column")], width="auto")
        ),
        dbc.Row(
            [
                dbc.Col([html.Div("One of three columns")], width=3),
                dbc.Col([html.Div("One of three columns"))],
                dbc.Col([html.Div("One of three columns")], width=3),
            ]
        ),
    ]
)

  实现效果:


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM