如何在 plotly-dash 中超链接图像?
How to hyperlink an image in plotly-dash?
通过查看破折号文档,我看不到任何用于在图像中嵌套超链接的语法或示例。我本质上是在尝试实现以下目标,但采用破折号布局友好格式(无论它使用 html 还是破折号核心组件):
<a href="https://www.twitter.com/username">
<img alt="Link to my twitter" src="twitterlogo.png"
width=32" height="32">
</a>
提前感谢任何帮助。
我相信这会奏效:
html.A(
href="https://www.twitter.com/username",
children=[
html.Img(
alt="Link to my twitter",
src="twitterlogo.png",
)
]
)
通过查看破折号文档,我看不到任何用于在图像中嵌套超链接的语法或示例。我本质上是在尝试实现以下目标,但采用破折号布局友好格式(无论它使用 html 还是破折号核心组件):
<a href="https://www.twitter.com/username">
<img alt="Link to my twitter" src="twitterlogo.png"
width=32" height="32">
</a>
提前感谢任何帮助。
我相信这会奏效:
html.A(
href="https://www.twitter.com/username",
children=[
html.Img(
alt="Link to my twitter",
src="twitterlogo.png",
)
]
)