在 flexdashboard 中添加超链接到 PNG
Add hyperlink to PNG inside flexdashboard
我想为已添加到我的 flexdashboard 的 PNG 添加超链接功能。
我已经成功地添加了一个文本超链接,如下面的代码(第一部分)所示,但我想将它添加到我在代码第二部分中添加的 PNG 图标中
---
title: "PNG Hyperlink"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
```
# Homepage
## Column {data-width=500}
### Introduction
<font size = "5">Please read user manual before exploring this dashboard. You can find user manual by clicking <a href="file:///C:/Users/Filip/Desktop/Dashboard%20guide.htm" target=_blank>here</a></font><br><br><br>
### Introduction 2
<font size = "5">Please read user manual before exploring this dashboard. You can find user manual by clicking the following icon</font><br><br><br>
```{r}
knitr::include_graphics("document-icon.png")
```
另外,如果有人知道如何缩小这张图片并用文字环绕它就更好了。
添加 href
属性。
这应该有效
我已经通过使用 @samarmohan
输入后的代码解决了这个问题。
这是代码
### Introduction 2
<font size = "5">Please read user manual before exploring this dashboard. You can find user manual by clicking the following icon</font><br><br><br>
<a href="file:///C:/Users/Filip/Desktop/Dashboard%20guide.htm" target=_blank><center>
```{r dpi=10}
knitr::include_graphics("document-icon.png")
```
</center></a>
我添加了 href
以便向图标添加超链接并使用 {r} 框内的 dpi =
使图标变小
我想为已添加到我的 flexdashboard 的 PNG 添加超链接功能。 我已经成功地添加了一个文本超链接,如下面的代码(第一部分)所示,但我想将它添加到我在代码第二部分中添加的 PNG 图标中
---
title: "PNG Hyperlink"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
```
# Homepage
## Column {data-width=500}
### Introduction
<font size = "5">Please read user manual before exploring this dashboard. You can find user manual by clicking <a href="file:///C:/Users/Filip/Desktop/Dashboard%20guide.htm" target=_blank>here</a></font><br><br><br>
### Introduction 2
<font size = "5">Please read user manual before exploring this dashboard. You can find user manual by clicking the following icon</font><br><br><br>
```{r}
knitr::include_graphics("document-icon.png")
```
另外,如果有人知道如何缩小这张图片并用文字环绕它就更好了。
添加 href
属性。
这应该有效
我已经通过使用 @samarmohan
输入后的代码解决了这个问题。
这是代码
### Introduction 2
<font size = "5">Please read user manual before exploring this dashboard. You can find user manual by clicking the following icon</font><br><br><br>
<a href="file:///C:/Users/Filip/Desktop/Dashboard%20guide.htm" target=_blank><center>
```{r dpi=10}
knitr::include_graphics("document-icon.png")
```
</center></a>
我添加了 href
以便向图标添加超链接并使用 {r} 框内的 dpi =
使图标变小