开发者

How to add scrollable tooltip HTML?

开发者 https://www.devze.com 2023-04-03 03:36 出处:网络
I want to add a scrollable tooltip, are there existing开发者_如何学编程 scripts or ways to accomplish this with jquery or css? If so, how? I would like to avoid using iframe if possible.Assuming the t

I want to add a scrollable tooltip, are there existing开发者_如何学编程 scripts or ways to accomplish this with jquery or css? If so, how? I would like to avoid using iframe if possible.


Assuming the tooltip is custom (i.e. triggered by a hover/click event), the HTML element used for the tooltip should be a fixed size with the CSS property, overflow:auto.


The most accepted way is usually a DIV with it's position:absolute and display:none. Once the mouse is over the tooltip area some javascript can show the DIV at the correct position (beside the mouse).

This method will allow any size DIV including a those with a scroll.

0

精彩评论

暂无评论...
验证码 换一张
取 消