gpt4 book ai didi

jquery - 如何在 qTip2 jquery 插件中设置样式?

转载 作者:行者123 更新时间:2023-12-03 22:49:16 24 4
gpt4 key购买 nike

我有以下代码:

$('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'
}

})

关于jquery - 如何在 qTip2 jquery 插件中设置样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32769596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com