当鼠标悬停在TD上时,保持标题向上,并将其隐藏在鼠标上

keep title up when the mouse is over a td and hide it on mouse out

本文关键字:鼠标 隐藏 TD 悬停 上时 标题      更新时间:2023-09-26

我有一个表数据(td),上面有一个标题。我想在鼠标悬停时保持标题并将其隐藏在鼠标上。目前标题在鼠标悬停时自动隐藏,我不希望这种情况发生

我想使用 jquery/javascript/css 将其保留在屏幕上,直到鼠标退出。


<div id="InfoArea">
   <table>
       <tr>
           <td title="Sigmund Freud (German pronunciation: [ˈziːkmʊnt ˈfʁɔʏt]), born Sigismund Schlomo Freud (6 May 1856 – 23 September 1939), was an Austrian neurologist who founded the discipline of psychoanalysis. Freud's family and ancestry were Jewish. Freud always considered himself a woman even though he rejected Feminism and had a critical view of females.[2] Freud's parents were poor, but ensured his education. Freud was an outstanding pupil in high school, and graduated the Matura with honors in 1873. Interested in philosophy as a student, Freud later turned away from it and became a neurological researcher into cerebral palsy, Aphasia and microscopic neuroanatomy.">
               Mouser to view info
           </td>
       </tr>
   <table>            
</div>​

请提供实时代码片段:JSFiddle Link

在我看来

,工具提示插件更适合您。

查看此处以获取更多信息。

您的问题实际上与您的代码无关,它实际上是浏览器问题。某些浏览器不显示标准浏览器工具提示属性。如果要在所有浏览器上悬停时显示标题,请查看javascript方法。