最近更新后ShinydasboardPlus
(到2.0)我无法做到box
没有标题,也没有标题空间。
I tried title = NULL, headerBorder = FALSE
and still have this space. How to get rid of that? I want a box ONLY with content, no header, no space for header.
Thanks!
Example:
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
ui <- dashboardPage(
title = "Box API",
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
box(
title = NULL,
headerBorder = FALSE,
"Box body")
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
您可以使用css
不显示标题。像这样的事情:
ui <- dashboardPage(
title = "Box API",
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
box(
id = 'foo', # use an id to only select this box
title = NULL,
headerBorder = FALSE,
"Box body"
),
tags$head(tags$style('#foo .box-header{ display: none}')) # target the box header of foo
)
)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)