以下是我的shiny 应用程序的编辑版本:
ui <- tagList(
fluidPage(
titlePanel(""),
tags$head(tags$style(HTML(
"
.navbar-default {
color: red !important;'
}
"
))),
navbarPage(
windowTitle = "App Name",
theme = bs_theme(bootswatch = "flatly",
base_font = font_google("Lato"),
primary = "#333F50",
bg = "white",
fg = "#D67540"),
title = "I am the title",
selected = "Main Tab 1",
tabPanel(title = "Main Tab 1",
fluidPage(
sidebarLayout(
sidebarPanel(textInput(inputId = "text_input", label = "Enter text:")),
mainPanel(textOutput(outputId = "text_output"))
)
)
),
tabPanel(title = "Main Tab 2",
fluidPage(
fluidRow(
column(7,
navlistPanel(
tabPanel("Tab 1"),
tabPanel("Tab 2"),
tabPanel("Tab 3"),
widths = c(2, 10),
well = FALSE)
)))
)
)
)
)
server <- function(input, output){
output$text_output <- renderText(input$text_input)
}
shinyApp(ui, server)
This is what "Main Tab 1" looks like:
当链接悬停/选中时,我想将"Main Tab 1"和"Main Tab 2"的文本 colored颜色 从白色更改为粉色,并从蓝绿色更改为红色.
到目前为止,我已经try 了以下方法的许多变体,但都没有成功:
.navbar-default {
color: red !important;
}
有人知道怎么解决这个问题吗?
如有任何帮助,我们不胜感激:)