[英]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.