【发布时间】:2018-01-04 14:55:24
【问题描述】:
我的示例代码:
library(shiny)
server <- function(input, output) {
}
ui <- fluidPage(
br(),
selectInput("select1", "Choose: ", c("Alt1.1", "Alt1.2"), selected = c("Alt1.1"), selectize = FALSE, multiple = TRUE),
br(),
selectInput("select2", "Choose: ", c("Alt2.1", "Alt2.2"), selected = c("Alt2.1"), selectize = FALSE, multiple = TRUE)
)
shinyApp(ui = ui, server = server)
我必须如何更改代码以使小部件的背景颜色为select1 的红色和select2 的蓝色?
编辑:
我试过了:
div(selectInput("select1", "Choose: ", c("Alt1.1", "Alt1.2"), selected = c("Alt1.1"), selectize = FALSE, multiple = TRUE), style = "background-color: red")
但这不是我要找的!相反,我希望选项的背景是红色的!
【问题讨论】: