【发布时间】:2019-07-13 07:27:36
【问题描述】:
我有下面的应用程序使用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)
是否可以进一步自定义。特别是我想将所有选择的字体颜色更改为 Black。我添加了下面的行,但是它未能更改字体颜色
tags$head(tags$style(HTML('#id {color:#000 !important;}'))),
任何指针都将受到高度赞赏。
【问题讨论】: