是否可以通过以下方式来设计工具提示框的美观性:bsTooltip
闪亮的?我已经寻找答案,但就工具提示而言,所有关于美观的调整似乎仅针对宽度(即这个问题 https://stackoverflow.com/questions/58320525/style-individual-bstooltip-shinybs-elements)。考虑 MWEshinyBS Githug 页面文档 https://ebailey78.github.io/shinyBS/docs/Tooltips_and_Popovers.html,仅包括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 正在改变,但我想设置工具提示本身的样式。
With .tooltip
你正在设计容器的样式,尝试.tooltip-inner
, e.g.
tags$style(HTML("
.tooltip > .tooltip-inner {
width: 400px;
color: white;
background-color: red;
}
"))
您可以找到更多提示here https://www.w3schools.com/bootstrap/bootstrap_ref_js_tooltip.asp.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)