【问题标题】:How to hyperlink an image in plotly-dash?如何在 plotly-dash 中超链接图像?
【发布时间】:2021-04-22 22:19:11
【问题描述】:

通过查看破折号文档,我看不到任何用于在图像中嵌套超链接的语法或示例。我本质上是在尝试以破折号布局友好的格式实现以下目标(无论它是使用 html 还是 dash-core-components):

<a href="https://www.twitter.com/username">
    <img alt="Link to my twitter" src="twitterlogo.png"
    width=32" height="32">
</a>

提前感谢任何帮助。

【问题讨论】:

    标签: python html plotly-dash


    【解决方案1】:

    我相信这会奏效:

    html.A(
        href="https://www.twitter.com/username",
        children=[
            html.Img(
                alt="Link to my twitter",
                src="twitterlogo.png",
            )
        ]
    )
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-30
      • 1970-01-01
      • 2020-12-03
      • 2022-01-06
      • 2021-11-15
      • 2017-09-15
      相关资源
      最近更新 更多