2017-10-04 99 views
0

我在wellPanel中只有一行和一列的布局。我的目标是垂直抵消这个面板。目前它被“粘”到最顶端,但应该向下移动几厘米。如何从顶部垂直偏移wellPanel?

library(shiny) 

ui <- fluidPage(
    wellPanel(fluidRow(column(width = 11, align = "center", h3("I need to move south!"))))) 

server <- function(input, output) {} 

shinyApp(ui = ui, server = server) 
+1

wellPanel()您可以添加'BR()',对wellPanel的'顶部添加新行()'... – Sagar

+0

好吧,这是一个妥协。不过,我宁愿让我更灵活的东西。 – Joe

回答

1

您可以在absolutePanel()

library(shiny) 
ui <- fluidPage(
    absolutePanel(top = "50%", left = 20, width = "97.5%", 
      wellPanel(
       fluidRow(
       column(
        width = 12, 
        align = "center", h3("I am at the centre!") 
       ) 
      ) 
      ) 
) 
) 

server <- function(input, output){} 
shinyApp(ui, server)