首页 文章

fileInput中的进度条颜色 - 闪亮

提问于
浏览
1

我试图在Shiny中的fileInput小部件中更改上载进度条的颜色 . 我是一个有点闪亮的新手,已经搜索互联网没有结果 . 有任何想法吗?

1 回答

  • 2

    这是一个示例应用程序,我使用css将进度条的颜色设置为绿色 .

    ui <- fluidPage(
    
        tags$head(tags$style(".progress-bar{background-color:#3c763d;}")),
    
        fileInput(inputId = "fileInp", label = "Input file:",multiple = FALSE,
                   accept = c(
                     "text/csv",
                     "text/comma-separated-values,text/plain",
                     ".csv"))
    
      )
    
    
      server <- function(input, output){
    
    
      }
    
      shinyApp(ui=ui, server=server)
    

    使用上面的代码,你得到这样的东西:
    enter image description here

    希望能帮助到你!

相关问题