如何显示鼠标悬停信息框?

时间:2022-03-05 09:01:05

I have a php website where I use mysql as database. I want a feature like https://www.instantssl.com their bottom right corner seal.

我有一个php网站,我使用mysql作为数据库。我想要一个像https://www.instantssl.com这样的功能,他们的右下角密封。

Its showing specific info when anyone hover the mouse or click it.

当任何人悬停鼠标或单击它时,它会显示特定信息。

I want the same feature. how can I do it?

我想要相同的功能。我该怎么做?

1 个解决方案

#1


You could create a <div> element within your page that holds the content you want displayed on mouse over. Once the mouse over event is trigger, you could then hide/show it. Things you should research:

您可以在页面中创建一个

元素,用于保存要在鼠标悬停时显示的内容。触发鼠标悬停事件后,您可以隐藏/显示它。你应该研究的事情:

  1. onmouseover event
  2. .show() jquery
  3. .hide() jquery

These are the three basic events that you need.

这些是您需要的三个基本事件。

#1


You could create a <div> element within your page that holds the content you want displayed on mouse over. Once the mouse over event is trigger, you could then hide/show it. Things you should research:

您可以在页面中创建一个

元素,用于保存要在鼠标悬停时显示的内容。触发鼠标悬停事件后,您可以隐藏/显示它。你应该研究的事情:

  1. onmouseover event
  2. .show() jquery
  3. .hide() jquery

These are the three basic events that you need.

这些是您需要的三个基本事件。