我想将鼠标悬停在单词上时显示 R markdown 文件中单词的定义。
对于链接,可以这样完成:
[I'm an inline-style link with title](https://www.google.com "Google's Homepage")
将鼠标悬停在I'm an inline-style link with title
上时,将弹出文本Google's Homepage
。但是,我想对一个单词做同样的事情,并在没有链接的框中给出该单词的定义。
类似:
[word]("Definition of word that pops up in a box upon hovering")
。这可能吗?
tippy
套餐。
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tippy)
```
This is a
```{r echo = FALSE}
tippy("word.", tooltip = "Definition of word that pops up in a box upon hovering")
```
I would like to know its definition.
在这里找到解决方案。
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Introduction to tooltip or popups
This is a <abbr title="Definition of word that pops up in a box upon hovering">word.</abbr> I would like to know its definition.
如果能够更改工具提示就好了。
此网页可以帮助您自定义标签(使用 HTML 缩写标签缩写您的代码)。
我也在寻找一种拥有维基百科悬停框样式的方法。
同样,当您将鼠标悬停在文本上时,您可以避免出现“默认”框并根据需要进行更改:此网站提供了修改“工具提示”框的示例。