Change the border colour of selectinput

左心房为你撑大大i 提交于 2019-12-11 07:06:29

问题


I am trying to change the border colour of a particular selectInputdefault colour grey to red. After inspecting the HTML I figured out the css parameter that controls the border colour. Then I used HTML tags shown in following code and was able to successfully change the border colour for both the selectInput. The problem is that I want to change the colour only for the first select input i.e Select1 and not Select2. Is it possible to change the border colour only one particular selectinput?

 library(shiny)

  ui <- fluidPage(

    tags$head(tags$style(HTML( ".selectize-input {border: 1px solid #dd4b39;}"))),

    selectInput("Select1", "Option1", choices = NULL),

    selectInput("Select2", "Option2", choices = NULL)
  )


  server <- function(input, output){

  }

  shinyApp(ui = ui, server = server) 

来源:https://stackoverflow.com/questions/43495968/change-the-border-colour-of-selectinput

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!