6

我在修改 qTip 的尖端大小 (x,y) 时遇到了一些麻烦。我试图以style: { tip: { x:2,y:2 } }各种方式添加,但失败了。

如何将其添加到以下脚本中?

  // Status Tooltips Style
  $.fn.qtip.styles.statusTooltips = {
    background: '#333333',
    color: 'white',
    textAlign: 'center',
    border: {
      width: 1,
      radius: 5,
      color: '#333333'
    },
    tip: 'leftMiddle',
    name: 'dark'
  }

  // Status Tooltips Init
  $('.status[title]').qtip({
    style: 'statusTooltips',
    position: {
      corner: {
         target: 'rightMiddle',
         tooltip: 'leftBottom'
      }
    }
  });
4

3 回答 3

10

这很简单:

$("#mytip").qtip({style: { tip: { size: { x: 10, y: 10}} }});

http://craigsworks.com/projects/qtip/docs/tutorials/#tips

于 2010-07-06T07:43:33.157 回答
4

对于 qtip 2,您可以只设置对象的widthheight属性tip

$("#mytip").qtip({
    style: {
        tip: {
            width: 10,
            height: 10
        }
    }
});

http://qtip2.com/plugins#tips.width

于 2013-10-02T15:42:54.643 回答
-6

知道了!

  $('.status[title]').qtip({
    风格:{背景:'#333333',
      白颜色',
      文本对齐:'中心',
      边框:{宽度:1,半径:5,颜色:'#333333'},
      提示:{角:'leftMiddle',尺寸:{ x:6,y:10 }}
    },
    位置:{角:{目标:'rightMiddle',工具提示:'leftBottom'}}
  });

谢谢,StackOverflow,作为一个偶尔的橡皮鸭:)

于 2010-07-06T07:57:50.737 回答