Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery qtip工具提示上的手动定位调整(不工作)_Jquery_Css_Position_Qtip - Fatal编程技术网

Jquery qtip工具提示上的手动定位调整(不工作)

Jquery qtip工具提示上的手动定位调整(不工作),jquery,css,position,qtip,Jquery,Css,Position,Qtip,我想模拟:css:position:relative;底部:10px,因此工具提示与目标垂直对齐(见图),但我无法完成 像这样努力 $('#nav a[href][title]').qtip({ content: { text: false // Use each elements title attribute }, position: { corner: { target: 'topLeft',

我想模拟:css:position:relative;底部:10px,因此工具提示与目标垂直对齐(见图),但我无法完成

像这样努力

 $('#nav a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      position: {
     corner: {
        target: 'topLeft',
        tooltip: 'middleRight'
                }
                },
     style: {
       name: 'dark',
       width: 230,
       padding: 3,
       bottom: 10,
       textAlign: 'center'
      }
 // Give it some style
   });
但是工具提示的文本会被移动,而不是工具提示本身

我该怎么做

编辑

正在尝试'adjust'属性,但我找不到语法错误

$('#nav a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      position: {
     corner: {
        target: 'topLeft',
        tooltip: 'middleRight'
                }
                },
     style: {
       name: 'dark',
       width: 230,
       padding: 3,
       position: 'relative',
       bottom: 10,
       textAlign: 'center'
      }
 // Give it some style
   });
您可以使用“位置”属性组的“调整”属性,如下所示:

$('#nav a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      position: {

      adjust: {
              x: 10px,
              y: 10px
       },

     corner: {
               target: 'topLeft',
               tooltip: 'middleRight'
                }
     },
     style: {
       name: 'dark',
       width: 230,
       padding: 3,
       textAlign: 'center'
      },
 // Give it some style
   });

我提供的数字是任意的。您可以根据需要使用它们定位。

感谢您的回复,因为Netbeans跳转语法错误(并且corse qtip未启用),我将编辑我的问题,我该如何放置它?再次感谢你!使用->调整:{x:'10px',y:'10px'}删除错误,但似乎没有任何效果。您使用的是qtip还是qtip2?他们已经发布了qtip2,旧的将很快被淘汰。无需重写,只需下载qtip2 js文件并用它替换旧文件。至于调整,我的坏,你不需要px,只需要使用没有引号的普通数字。好的,就是这样。我的解决方案:adjust:{y:-10}如果您仍在使用jquery.qtip-1.0.0-rc3.js以及jquery 1.8.2或更低版本,则可能需要更新qtip库以调用.outerHeight和.outerWidth调用以包含布尔参数,以获得正确的位置和尺寸。确切地说,只需将以下方法调用替换为:.outerHeight()和.outerWidth()。outerWidth()为.outerHeight(true)和.outerWidth(true)。布尔值指示包含/排除边距,在1.8.2或更低版本中,边距似乎返回实际值,而不是仅调用返回jQuery对象的.outerHeight和outerWidth。
position: {
    corner: {
        target: 'topLeft',
        tooltip: 'middleRight'
        },
    adjust: {
        x: 10,
        y: 10
        }
    }