【问题标题】:qTip2 - Add a titlebar to my tooltip?qTip2 - 在我的工具提示中添加标题栏?
【发布时间】:2016-05-31 21:23:27
【问题描述】:

我想为我的 qTip2 工具提示添加一个标题。目前我有这个代码:

<script>
    $(document).ready(function () {
        $('[title]').qtip({
        style: { classes: 'qtip-dark'}    
    });
});
</script>

<div title="TITLE">TEXT</div>

这给了我一个带有简单工具提示的文本 (http://beta.summonersindex.com/test.html)。我只是没有设法添加标题,如演示页面上所示:http://qtip2.com/demos('添加标题')。 我为此寻找了很多解决方案,但它们要么已过时,要么不适合我。我希望你们能帮助我!谢谢:)

【问题讨论】:

    标签: jquery html title jscript qtip2


    【解决方案1】:

    你可以这样做:

    JS

    $(document).ready(function () {
        $('.someText').qtip({
            style: { classes: 'qtip-dark'},
            content: {
                text: 'Your text here',
                title: 'Your title here'
            }
    
        });
    });
    

    HTML

    <div class="someText">TEXT</div>
    

    【讨论】:

    • 谢谢伙计,这行得通!另一个问题:我的工具提示有自定义样式:.si{ border: 1px solid #fff; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; background-color: rgba(0, 0, 0, 0.8); font-family: "Verdana"; color: #fff; font-size: 12px; } 我现在如何自定义标题栏? :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多