-
CSS 적용하기plotly dash 2022. 5. 30. 09:54
문제
Inline CSS 를 이용해 아래와 같이 꾸며보자.
코드
from dash import Dash, html, dcc import dash_bootstrap_components as dbc app = Dash() # app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP]) # app = Dash(__name__, external_stylesheets=['https://codepen.io/chriddyp/pen/bWLwgP.css']) app.layout = html.Div([ html.H1('Country City Dashboard', style={'textAlign': 'center', 'fontFamily': 'fantasy', 'fontSize': 50, 'color': 'blue'}), html.P(['Naver: ', html.A('Naver', href='https://www.naver.com', target='_blank')], style={'border': 'solid'}), html.Label('Korea City: '), dcc.Dropdown( options=['Seoul', 'Pusan', 'Kwangju'], value='Seoul', style={'backgroundColor': 'lightblue'} ) ], style={'padding': 100, 'border': 'solid'}) if __name__ == '__main__': app.run_server(debug=True)
설명
- https://dash-bootstrap-components.opensource.faculty.ai/docs/themes/
- https://dash.plotly.com/external-resources
참고: https://www.udemy.com/course/python-interactive-dashboards-with-plotly-dash
'plotly dash' 카테고리의 다른 글
Dash router (0) 2022.05.30 Grid Layout (0) 2022.05.30 Callbacks with State (0) 2022.05.29 Chained Callback (0) 2022.05.29 2개 이상 Variable 의 callback 연결 (0) 2022.05.29