CSS tooltip issue with overlapping tooltips

纵然是瞬间 提交于 2019-12-07 16:04:27
Amos M. Carpenter

Ok, so I've been looking for other ways to tackle this than just getting the CSS selectors right to do what I'm after, and, looking at toggling display instead of opacity, came across this answer, which got me onto the idea of setting/toggling visibility as well as opacity. So to show the tooltip, essentially I set:

opacity: 1;
visibility: visible;

And to hide it:

opacity: 0;
visibility: hidden;

This finally gets my tooltips to behave as they should even when a container is covered by a hidden tooltip from above, because if it's not visible, it can't trigger the hover (which it can trigger when it's just completely transparent). Here's the forked fiddle:

http://jsfiddle.net/4k90opzv/1/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!