1

我有QTips:

eventRender: function (event, element, view) {
    element.qtip({
        content: event.title + event.hours,
        position:{
            target: 'mouse'
        },
        //  show: { event: 'click' },
        hide: { event: 'mousedown mouseleave' },
        style: { 
            width: 200,
            padding: 5,
            color: 'black',
            textAlign: 'left',
            border: {
                width: 1,
                radius: 3
            },
            classes: 'custSideTip'
        } 
    });
}

CSS:

.custSideTip
{
    position:fixed !important;
    right:0 !important;
    max-width:200px !important;
}

在此处输入图像描述

但他们离开了页面......

我尝试了正确和固定的位置,但似乎没有任何效果......

提示的正确坐标不应超过 body.right / page.right ...如果有意义的话..

谢谢

4

2 回答 2

7

取自这里

您可以尝试使用视口配置:

position: { viewport: $(window) }
于 2013-04-23T16:00:53.720 回答
3

这对我有用,其他示例在 jQuery 代码中没有一些错误。也许有些版本差异?

position: { viewport: $(document.body) }
于 2017-01-17T20:44:54.537 回答