我有下面的应用程序使用shinyWidgets包
library(shinyWidgets); library("shiny")
ui <- fluidPage(
multiInput(
inputId = "id", label = "Fruits :",
choices = c("Banana", "Blueberry", "Cherry",
"Coconut", "Grapefruit", "Kiwi",
"Lemon", "Lime", "Mango", "Orange",
"Papaya"),
selected = "Banana", width = "400px",
options = list(
enable_search = FALSE,
non_selected_header = "Choose between:",
selected_header = "You have selected:"
)
),
verbatimTextOutput(outputId = "res")
)
server <- function(input, output, session) {
output$res <- renderPrint({
input$id
})
}
shinyApp(ui = ui, server = server)是否有可能进一步定制。特别是我想改变字体颜色为黑色的所有选择。我在下面添加了一行,但是它未能更改字体颜色。
tags$head(tags$style(HTML('#id {color:#000 !important;}'))),任何指针都将受到高度赞赏。
发布于 2019-07-13 09:09:51
使用此CSS:
css <- "#id+div div a {color: black;}"
ui <- fluidPage(
tags$head(tags$style(css)),
......https://stackoverflow.com/questions/57017070
复制相似问题