Tippy.js z-index 不适用于交互性

ede*_*ter 3 css tippyjs

参考: https: //atomiks.github.io/tippyjs/

尽管我指定了.z-index,但指定时 z-index 似乎不起作用interactive:true(然后它落后于其他元素)#main_container。我怎样才能把它“放在所有东西的前面” interactive:true

delegate( '#main_container', {
target: '[data-tippy-content]', allowHTML: true, 
interactive: true, placement: 'right', theme: 'light', zIndex: 99999
} );
Run Code Online (Sandbox Code Playgroud)

另请参阅此处: https: //github.com/projectje/bookmark了解上述代码。我做了一个临时解决方法,在每个第一个字符后面放置一个 BR,这样它就不会流过其他框。但这确实是一个短期的解决方法。

ato*_*iks 6

默认情况下,当 \xe2\x80\x94 时,尖端会附加到引用元素的父级,interactive如果父级是“包含块”,这可能会导致它被剪裁。

\n

要修复,请使用以下之一:

\n
    \n
  • 使用popperOptions: { strategy: 'fixed' }, 或
  • \n
  • 指定appendTo: document.body+键盘使用的焦点管理
  • \n
\n