我看到这里有一个类似的问题:
调整闪亮仪表板中仪表板标题的高度
但我没有资格对给定的答案发表评论。
这个答案给出的解决方案将在我想扩大标题大小的情况下起作用。然而,当我将尺寸减小到 20 像素时,这只改变了标题的标题部分的高度,我想减小闪亮仪表板中整个标题栏的高度。
这可能吗 ?
这是使用上述问题的解决方案的示例:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(
# Set height of dashboardHeader
tags$li(class = "dropdown",
tags$style(".main-header {max-height: 20px}"),
tags$style(".main-header .logo {height: 20px}")
)
),
dashboardSidebar(
# Adjust the sidebar
tags$style(".left-side, .main-sidebar {padding-top: 20px}")
),
dashboardBody()
)
server <- function(input, output){}
shinyApp(ui, server)
您需要覆盖导航栏的最小高度和侧边栏切换上的填充。我已经更新了您的示例如下:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(
# Set height of dashboardHeader
tags$li(class = "dropdown",
tags$style(".main-header {max-height: 20px}"),
tags$style(".main-header .logo {height: 20px;}"),
tags$style(".sidebar-toggle {height: 20px; padding-top: 1px !important;}"),
tags$style(".navbar {min-height:20px !important}")
)
),
dashboardSidebar(
# Adjust the sidebar
tags$style(".left-side, .main-sidebar {padding-top: 20px}")
),
dashboardBody()
)
server <- function(input, output){}
shinyApp(ui, server)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)