将鼠标悬停在单词上时在框中显示文本 [英] Show text in a box when hovering over word

查看:65
本文介绍了将鼠标悬停在单词上时在框中显示文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将鼠标悬停在单词上时,我想在R markdown文件中显示单词的定义.

对于链接,可以这样完成: [我是带有标题的内联样式链接](https://www.google.com"Google的主页")悬停时通过我是一个带标题的内联样式链接,将弹出文本 Google主页.但是,我想对一个单词做同样的事情,并在没有链接的框中给出单词的定义.

类似的东西: [word](在悬停时弹出在框中的单词的定义").这可能吗?

解决方案

一个选项是

I would like to show a definition of a word in a R markdown file when hovering over a word.

For a link it can be done like this: [I'm an inline-style link with title](https://www.google.com "Google's Homepage") Upon hovering over I'm an inline-style link with title the text Google's Homepage will pop up. However, I would like to do the same for a word and give the definition of the word in a box without the link.

Something like: [word]("Definition of word that pops up in a box upon hovering"). Is this possible?

解决方案

One option is the tippy package.

```{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.

这篇关于将鼠标悬停在单词上时在框中显示文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆