2017-10-04 134 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)