gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 15:21:34 24 4
gpt4 key购买 nike

如何更改图像尺寸?我已经使用下面的代码行插入了图片,但似乎无法弄清楚如何缩小图片

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

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

有什么建议么

最佳答案

将您的style属性移到Img内:

html.Div(html.Img(src=app.get_asset_url('logo.png'), style={'height':'10%', 'width':'10%'}))
width可能是多余的,但我不确定。

关于python - 如何在绘图破折号中更改图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58483221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com