change colour of selectizeInput options in R Shiny

后端 未结 2 1790
栀梦
栀梦 2020-12-21 11:14

I would like to change the colour of each individual option of the selectizeInput menu in my Shiny app. In the following example code below I am able to change

2条回答
  •  别那么骄傲
    2020-12-21 12:09

    You can do:

    .option[data-value=a] {
      background: red !important;
      color: white !important;
    }
    .option[data-value=b] {
      background: green !important;
      color: white !important;
    }
    .option[data-value=c] {
      background: blue !important;
      color: white !important;
    }
    .option[data-value=d] {
      background: magenta !important;
      color: white !important;
    }
    

提交回复
热议问题