如何在绘图破折号中更改图像大小

Mat*_*s12 7 python dashboard image python-3.x plotly-dash

如何更改图像大小?我已经使用下面的代码行插入我的图像,但我似乎无法弄清楚你是如何让它变小的

html.Div(html.Img(src=app.get_asset_url('logo.png')))
Run Code Online (Sandbox Code Playgroud)

我试过了:

html.Div(html.Img(src=app.get_asset_url('logo.png')),style={'height':'10%'})
Run Code Online (Sandbox Code Playgroud)

有什么建议

Kos*_*dis 17

移动你的style属性里面Img

html.Div(html.Img(src=app.get_asset_url('logo.png'), style={'height':'10%', 'width':'10%'}))
Run Code Online (Sandbox Code Playgroud)

可能width是多余的,但我不确定。