【发布时间】:2019-01-30 09:57:15
【问题描述】:
我想将两个宽度相等的动作按钮居中,并在它们之间留一些空间。所以我尝试了:
library(shiny)
ui <- fluidPage(
fluidRow(
align = "center",
br(),
column(
12,
actionButton(
inputId = "ab1",
label = "Left button",
style = "width:400px"
),
actionButton(
inputId = "ab2",
label = "Right button",
style = "width:400px"
)
) # column
) # fluidRow
) # fluidPage
server <- function(input, output) {}
shinyApp(ui, server)
这给出了:
如何增加两个按钮之间的间距?在Shiny - How to increase spacing between inline radio buttons?之后我尝试了右键style = "width:400px; margin.left:200px",但是没有任何效果。
编辑:按照 Stephane 的建议,我尝试了:
library(shiny)
ui <- fluidPage(
fluidRow(
align = "center",
br(),
column(
6,
actionButton(
inputId = "ab1",
label = "Left button",
style = "width:400px"
)
),
column(
6,
actionButton(
inputId = "ab2",
label = "Right button",
style = "width:400px"
)
)
) # fluidRow
) # fluidPage
server <- function(input, output) {}
shinyApp(ui, server)
但是,现在两个按钮之间的空间太大了:
如何使它更小,我。 e.如何控制?
【问题讨论】:
-
您不能使用两个
column(6,每个按钮一个,而不是一个column(12,?