如何在 qTip2 jquery 插件中设置样式?
How do I set styles in qTip2 jquery plugin?
我有以下代码:
$('a.phonetooltip').qtip({ // Grab some elements to apply the tooltip to
content: {
text: 'Clicking this link will only work on mobile devices',
style: { classes: 'qtip-dark' }
}
})
多年来我一直在尝试将默认样式更改为深色样式,但我无法让它工作。它始终以默认样式显示。
qTip2 指南上说:
/* Basic styles */
.qtip-light{} /* Light coloured style */
.qtip-dark{} /* Alternative dark style */
.qtip-cream{} /* Cream-esque style, similar to the default */
.qtip-red{} /* Alert-ful red style */
.qtip-green{} /* Positive green style */
.qtip-blue{} /* Informative blue style */
/* CSS3 styles */
.qtip-rounded{} /* CSS3 border-radius class for applying rounded corners to your tooltips */
.qtip-shadow{} /* CSS3 box-shadow class for applying shadows to your tooltips */
.qtip-bootstrap{} /* Twitter Bootstrap style */
.qtip-youtube{} /* Google's new YouTube style */
.qtip-tipsy{} /* Minimalist Tipsy style */
.qtip-tipped{} /* Tipped libraries "Blue" style */
.qtip-jtools{} /* jTools tooltip style */
.qtip-cluetip{} /* Good ole' ClueTip style */
但是它没有给出如何实现它们的示例代码。求助!
可能是因为 style
与 content
是分开的 属性。
试试这个:
$('a.phonetooltip').qtip({
content: {
text: 'Clicking this link will only work on mobile devices'
},
style: {
classes: 'qtip-dark'
}
})
我有以下代码:
$('a.phonetooltip').qtip({ // Grab some elements to apply the tooltip to
content: {
text: 'Clicking this link will only work on mobile devices',
style: { classes: 'qtip-dark' }
}
})
多年来我一直在尝试将默认样式更改为深色样式,但我无法让它工作。它始终以默认样式显示。
qTip2 指南上说:
/* Basic styles */
.qtip-light{} /* Light coloured style */
.qtip-dark{} /* Alternative dark style */
.qtip-cream{} /* Cream-esque style, similar to the default */
.qtip-red{} /* Alert-ful red style */
.qtip-green{} /* Positive green style */
.qtip-blue{} /* Informative blue style */
/* CSS3 styles */
.qtip-rounded{} /* CSS3 border-radius class for applying rounded corners to your tooltips */
.qtip-shadow{} /* CSS3 box-shadow class for applying shadows to your tooltips */
.qtip-bootstrap{} /* Twitter Bootstrap style */
.qtip-youtube{} /* Google's new YouTube style */
.qtip-tipsy{} /* Minimalist Tipsy style */
.qtip-tipped{} /* Tipped libraries "Blue" style */
.qtip-jtools{} /* jTools tooltip style */
.qtip-cluetip{} /* Good ole' ClueTip style */
但是它没有给出如何实现它们的示例代码。求助!
可能是因为 style
与 content
是分开的 属性。
试试这个:
$('a.phonetooltip').qtip({
content: {
text: 'Clicking this link will only work on mobile devices'
},
style: {
classes: 'qtip-dark'
}
})