Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
选择输入标签CSS_Css_Shiny - Fatal编程技术网

选择输入标签CSS

选择输入标签CSS,css,shiny,Css,Shiny,我正在创建带有蓝色标题的白色div,但是当我在div中放入selectInput时,我想要的蓝色标题就是selectInput标签 如何编辑下面用于创建块的代码,以使“蓝色”框的样式与“蓝色”块的样式相同 library(shiny) # I have two blocks BLUE and TO_BLUE blocks <- c("BLUE", "TO_BLUE") BLOCK <- function(data, name) { # create a white div

我正在创建带有蓝色标题的白色div,但是当我在div中放入selectInput时,我想要的蓝色标题就是selectInput标签

如何编辑下面用于创建块的代码,以使“蓝色”框的样式与“蓝色”块的样式相同

library(shiny)

# I have two blocks BLUE and TO_BLUE
blocks <- c("BLUE", "TO_BLUE")

BLOCK <- function(data, name)
{
  # create a white div with rounded edges
  # the title of the div will have a blue background
  div(style = "
      text-align: center;
      font-size: 12px;
      background-color: white;
      border-radius: 10px;
      color: black;
      margin-bottom: 15px;
      min-height: 55px;
      ",
      id = name,

      if (name == "BLUE") {
        # this div gives the "BLUE" block it's blue background
        div(style = "background-color: #0c283b;
            color: white;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
            min-width: 70px;",
            name)
      } else {
        # but how do I get the TITLE within the selectInput to be blue like the block above?
        selectInput(name, "TO_BLUE", choices = c("1", "2", "3", selectize = FALSE))
      }

  )
}

ui <- fluidPage(


   sidebarLayout(
      sidebarPanel(
        lapply(blocks, BLOCK, data = blocks)
      ),

      mainPanel()
   )
)

server <- function(input, output) {
}

shinyApp(ui = ui, server = server)
库(闪亮)
#我有两个街区是蓝色和蓝色的

块使用
shinyjs
I添加

inlineCSS(".control-label { 
            background-color: #0c283b; 
            width: 100%; 
            color: white;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
            }")