简体   繁体   English

Bootstrap工具提示/ Popper放置无法正常工作

[英]Bootstrap Tooltip / Popper placement not working properly

I am using Bootstrap tooltip but for some reason, placement doesn't work properly. 我正在使用Bootstrap工具提示,但由于某些原因,放置无法正常工作。

For example, given the below code: 例如,给出以下代码:

$('#calendar-of-events .calendar-of-events__contents').tooltip({
                    selector: "a.event-tooltip",
                    trigger: 'hover',
                    placement: 'left'
                })

It produces the tooltip below; 它产生下面的工具提示; instead of placing it on the left, it is somehow place on the right. 而不是放在左边,而是放在右边。 The 'origin' of the tooltip itself seems wrong as well. 工具提示本身的“来源”也似乎是错误的。

在此处输入图片说明

Is there something preventing the tooltip from being calculated on the left? 是否有某些东西会阻止在左侧计算工具提示? Are there any css stylings I need to be aware of? 我需要了解任何CSS样式吗?

A reason that could lead the tool-tip to not be in the correct placement is the space allocated around the div in which you have placed it. 可能导致工具提示未正确放置的原因是在放置它的div周围分配的空间。 Because your tool-tip has a lot of content inside of it, a suggestion to overcome the misplacement of the tool-tip would be to maybe change the font size, or allocate more space to the div in which the tool-tip is being placed. 由于您的工具提示中包含很多内容,因此,解决该工具提示错位的建议可能是更改字体大小,或为放置工具提示的div分配更多空间。

Similar question, might have the answer you are looking for... 类似的问题,可能会找到您想要的答案...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM