如何更改闪亮的标签集中线条的颜色?
How to change the color of the lines in the tabset on shiny?
您好,感谢您阅读我的文章。我试图在闪亮的应用程序中更改此特定行的颜色,但不确定该怎么做:
我正在使用以下代码:
ui <- fluidPage(sidebarLayout(
sidebarPanel(
selectInput("controller", "Controller", choices = 1:3)
),
mainPanel(
tabsetPanel(id = "inTabset",
tabPanel(
div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel1", "Panel 1 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel2", "Panel 2 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel3", "Panel 3 content")
)
)
))
server <- function(input, output, session) {
}
shinyApp(ui, server)
具体来说,这部分:
mainPanel(
tabsetPanel(id = "inTabset",
tabPanel(
div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel1", "Panel 1 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel2", "Panel 2 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel3", "Panel 3 content")
)
)
我可以使用什么标签来更改该行的颜色?到目前为止我还没有在互联网上找到任何东西:(
css <- "
/* for the active tab */
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
border: 1px solid red;
border-bottom-color: transparent;
}
/* for the line */
.nav-tabs {
border-bottom-color: green;
}
"
ui <- fluidPage(
tags$head(
tags$style(HTML(css))
),
......
您好,感谢您阅读我的文章。我试图在闪亮的应用程序中更改此特定行的颜色,但不确定该怎么做:
我正在使用以下代码:
ui <- fluidPage(sidebarLayout(
sidebarPanel(
selectInput("controller", "Controller", choices = 1:3)
),
mainPanel(
tabsetPanel(id = "inTabset",
tabPanel(
div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel1", "Panel 1 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel2", "Panel 2 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel3", "Panel 3 content")
)
)
))
server <- function(input, output, session) {
}
shinyApp(ui, server)
具体来说,这部分:
mainPanel(
tabsetPanel(id = "inTabset",
tabPanel(
div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel1", "Panel 1 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel2", "Panel 2 content"),
tabPanel(div("mytabtitle", style = "color: transparent; background-color: transparent;"), value = "panel3", "Panel 3 content")
)
)
我可以使用什么标签来更改该行的颜色?到目前为止我还没有在互联网上找到任何东西:(
css <- "
/* for the active tab */
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
border: 1px solid red;
border-bottom-color: transparent;
}
/* for the line */
.nav-tabs {
border-bottom-color: green;
}
"
ui <- fluidPage(
tags$head(
tags$style(HTML(css))
),
......