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