当您在intro.js中添加一个大工具提示时,它会通过执行以下操作来计算是否有空间将工具提示放在顶部,底部,左侧,右侧:
/*
* auto determine position
*/
// Check for space below
if (targetElementRect.bottom + tooltipHeight + tooltipHeight > windowSize.height) {
_removeEntry(possiblePositions, "bottom");
}
// Check for space above
if (targetElementRect.top - tooltipHeight < 0) {
_removeEntry(possiblePositions, "top");
}
// Check for space to the right
if (targetElementRect.right + tooltipWidth > windowSize.width) {
_removeEntry(possiblePositions, "right");
}
// Check for space to the left
if (targetElementRect.left - tooltipWidth < 0) {
_removeEntry(possiblePositions, "left");
}
Run Code Online (Sandbox Code Playgroud)
有没有办法可以强制它让工具提示在元素下面并使页面可滚动?(动态改变页面高度)(即使在实际的原始主体已经结束之后)