如何显示 checkboxGroupInput
水平(内联块)与 R Shiny ?
最佳答案
你可以这样做:
checkboxGroupInput(inputId="test", label="Test", choices=1:4),
tags$style(type="text/css", HTML("#test>*{float: left; margin-right: 15px; height: 20px;} #test {height: 20px;}"))
或者直接编辑一个
css
文件,见 https://groups.google.com/forum/#!topic/shiny-discuss/EMQV8NbA3MI编辑
自
shiny 0.10.0
,您可以使用 inline
水平布局的论据:library("shiny")
ui <- fluidPage(
checkboxGroupInput(inputId="test", label="Test", choices=1:4, inline = TRUE)
)
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)
关于R Shiny 显示 checkboxGroupInput 水平,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21985324/