首页 > 解决方案 > 如何覆盖 boostrap.css 中的 .popover-title 类?

问题描述

我想更改标题中的默认字体颜色。在 html 中的 bootstrap.css 之后添加新的 css 不起作用。

这是示例:http: //jsfiddle.net/Wy22s/1309/

$('#signalTable').DataTable({
            drawCallback: function () {
              $('[data-toggle="popover"]').each(function (index) {
    console.log(index + ": " + $(this).text());
    $(this).popover({
        placement: 'left',
        html: true,
        content: '<button id="zoomin" type="button" class="btn dismiss">+</button>&nbsp<button type="button" class="btn">-</button>',
        title: $(this).text(),
        //container: '#' + this.id,
    }).on("mouseenter", function () {
                        var _this = this;
                        $(this).popover("show");
                        $(".popover").on("mouseleave", function () {
                            $(_this).popover('hide');
                        });
                    }).on("mouseleave", function () {
                        var _this = this;
                        setTimeout(function () {
                            if (!$(".popover:hover").length) {
                                $(_this).popover("hide");
                            }
                        }, 100);
                });

});
 $('[data-toggle="popover"]').parent().on('click', '#zoomin', function (index) {
    alert($(this).closest('tr').children('td:last').text()); 
});

}
        });

谁能帮我更改标题的字体颜色?

标签: twitter-bootstrapbootstrap-popover

解决方案


推荐阅读