简体   繁体   English

如何更改 plotly dash 中的图像大小

[英]How to change image size in plotly dash

How do i change the image size?如何更改图像大小? I've used the below line of code to insert my image but i cannot seem to figure out how you make it smaller我已经使用下面的代码行来插入我的图像,但我似乎无法弄清楚你如何使它更小

html.Div(html.Img(src=app.get_asset_url('logo.png')))

i've tried:我试过了:

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

any suggestions有什么建议么

Move your style attribute inside Img :Img中移动您的style属性:

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

Probably width is redundant but I'm not sure. width可能是多余的,但我不确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM