这是使用时的典型问题
height:100%
。使用uiOutput会在您的周围添加一个div
renderUI
不幸的是,这个div的默认高度是0。修正将高度设置为
100%
对于这个部门也是如此。
if (interactive()) {
ui <- fillPage(
uiOutput("back",style = "height:100%;")
)
server <- function(input, output, session) {
output$back <- renderUI({
fillRow(
fillCol(".", style = "background-color: red;", height = "10%"),
fillCol(".", style = "background-color: blue;", height = "10%")
)
})
}
shinyApp(ui, server)
}
希望这有帮助!