如何显示 checkboxGroupInput
水平(内联块)与R闪亮?
如何显示 checkboxGroupInput
水平(内联块)与R闪亮?
你可以这样做:
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)
你可以这样做:
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)