更改 bsTooltip 框的颜色为闪亮

Change color of bsTooltip boxes in shiny

是否可以在闪亮的 bsTooltip 中设置工具提示框的美学样式?我搜索了 SO 的答案,但关于工具提示,所有关于美学的调整似乎仅针对宽度(即 ). Consider the MWE from the shinyBS Githug Pages document,仅包括 bsTooltip 部分和一些修改的 CSS :

library(shiny)
library(shinyBS)
shinyApp(
    ui =
        fluidPage(

            sidebarLayout(
                sidebarPanel(
                    tags$style(
                        HTML(
                            "
                        .tooltip {
                        width: 400px;
                        text-color:black;
                        background-color:red;
                        }
                        "

                        )),

                    sliderInput("bins",
                                "Number of bins:",
                                min = 1,
                                max = 50,
                                value = 30),
                    bsTooltip("bins", "The wait times will be broken into this many equally spaced bins",
                              "right")
                ),
                mainPanel(

                )
            )
        ),
    server =
        function(input, output, session) {

        }
)

结果如下:

似乎持有工具提示的 div 正在改变,但我想设计工具提示本身的样式。

使用 .tooltip 设置容器样式,请尝试 .tooltip-inner,例如

tags$style(HTML("
                .tooltip > .tooltip-inner {
                width: 400px;
                color: white;
                background-color: red;
                }
                "))

您可以找到更多提示here