我刚刚拿起了JQuery的qtip2插件,根据他们的例子,我似乎不能让这种风格工作。也许我没有理解什么?
这是他们加载6个默认可用主题的示例,但无论我使用奶油、红色、深色、浅色、蓝色还是绿色,它都不会改变任何东西。我只是一直得到默认的奶油主题。从qtip 1x开始,这些也应该已经可用了?
$("jqueryselector").qtip({
content: 'Dark themes are all the rage!',
style: {
name: 'dark' // Inherit from preset style
}
});我在JQuery中的代码如下:
$(function(){
$('a['title']).qtip({style:{name:'red',tip:true}}); // picked up from the getting started page
});发布于 2011-05-14 17:24:25
这种设置工具提示样式的方式适用于qtip的original version,它现在已被较新版本所取代。qtip2使用了一种更好的基于类的样式方法。
$('.selector').qtip({
content: {
text: 'I\'m blue... deal with it!'
},
style: {
classes: 'ui-tooltip-blue ui-tooltip-shadow'
}
});您肯定想要使用qtip2。它比qtip1有了很大的改进。
发布于 2011-05-14 14:11:02
看起来你少了几个支架。
$('a['title']).qtip(style:{name:'red',tip:true}); // your code
$('a[title]').qtip({ style: { name: 'cream', tip: true } }); // their code编辑:几个月前我使用了qtip,并最终做到了这一点。
style: {
//name: 'cream',
tip: true,
background: '#E6EFF5',
color: '#297AA8',
border: {
radius: 8,
color: '#bfd8e8'
}
}https://stackoverflow.com/questions/5999834
复制相似问题