我有一个简单的闪亮应用程序,我想在其中使用 javascript 将我的 selectInput() 的背景颜色从白色更改为橙色。是否可以?我应该把callback论点放在哪里?
#ui.r
library(shiny)
ui <- fluidPage(
theme=shinytheme("slate") ,
# App title ----
titlePanel(uiOutput("title")),
#This hides the temporary warning messages while the plots are being created
tags$style(type="text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }"
),
# Sidebar layout with input and output definitions ----
sidebarLayout(
uiOutput("menu"),
# Main panel for displaying outputs ----
mainPanel(
)
)
)
#server.r
server = function(input, output) {
output$menu<-renderUI({
sidebarPanel(width = 2,
selectInput("sel","",
choices = c("Home","About","Sector A","Sector B","Sector C"),
selected = "Home"),
tags$style(
"select#sel {background: #FFA500}"
)
)
})
}
慕村225694
拉丁的传说
相关分类