【问题标题】:How to change image size in plotly dash如何在绘图破折号中更改图像大小
【发布时间】:2020-02-17 08:40:35
【问题描述】:

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

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%'})

任何建议

【问题讨论】:

    标签: python python-3.x image dashboard plotly-dash


    【解决方案1】:

    style 属性移到Img 中:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-13
      • 2014-10-31
      • 2021-12-16
      • 2017-04-01
      • 2021-11-24
      • 2019-12-05
      相关资源
      最近更新 更多