Css 如何在屏幕上为selectInput占位符提示添加颜色?

Css 如何在屏幕上为selectInput占位符提示添加颜色?,css,r,shiny,Css,R,Shiny,我想在SelectInput框(段迁移)中做出蓝色的“Choose”提示,使其看起来与其他输入框类似,但失败了。 以下是我在UI部分中使用的代码: column(width=2, selectInput(inputId = "SEG_MIG", label = "Segment Migration", choices =c("Choose"='', "ALL",

我想在
SelectInput
框(段迁移)中做出蓝色的“Choose”提示,使其看起来与其他输入框类似,但失败了。

以下是我在UI部分中使用的代码:

  column(width=2,
       selectInput(inputId = "SEG_MIG",
                   label = "Segment Migration",
                   choices =c("Choose"='', "ALL",
                              unique(sort(as.character(final_data$`SEG MIG`)))),
                   multiple = TRUE
                   ))
左侧两个inputbox中的选定元素用此代码涂成蓝色

  tags$style(type='text/css', ".selectize-input { font-size: 16px; line-height: 16px; color: blue;} 
                           .selectize-dropdown { background: grey; color: white; font-size: 12px; line-height: 12px; }"),

我不知道我错过了什么。如果您有任何建议,我们将不胜感激。

以下是CSS,用于控制选项、项目和占位符的样式

library(shiny)

css <- "
.selectize-dropdown-content .option {
  color: blue;
}
.selectize-input .item {
  color: red !important;
  background-color: yellow !important;
}
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
  color: pink;
}
::-moz-placeholder { /* Firefox 19+ */
  color: pink;
}
:-ms-input-placeholder { /* IE 10+ */
  color: pink;
}
:-moz-placeholder { /* Firefox 18- */
  color: pink;
}"

ui <- fluidPage(
  tags$head(
    tags$style(HTML(css))
  ),
  column(width=2,
         selectInput(inputId = "SEG_MIG",
                     label = "Segment Migration",
                     choices = c("Choose"='', "ALL", "AAA", "BBB"),
                     multiple = TRUE
         )
  )
)

server <- function(input, output) {}

shinyApp(ui, server)
库(闪亮)

css你想要所有的项目都是蓝色的,还是只选择?你好Stephane,我想要所有的项目都是蓝色的。谢谢@Stephane Laurent@