Val*_*ANC 4 r shiny shinydashboard
我想知道如何调整dashboardheaderin的高度shinydashboard
dashboardHeader(
title = loadingLogo('http://company.fr/','logo.jpg','buffpowa.gif'),
titleWidth = 600
)
Run Code Online (Sandbox Code Playgroud)
我可以修改,width但标志对于标题来说太大了。我希望标题有足够的高度来显示完整的标志。
谢谢
您需要设置height以下元素中的 :.main-header和.main-header .logo。另请注意,只有将它们设置tags$li在dropdown类中时才有效。
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(
# Set height of dashboardHeader
tags$li(class = "dropdown",
tags$style(".main-header {max-height: 200px}"),
tags$style(".main-header .logo {height: 200px}")
),
# Use image in title
title = tags$a(href='http://company.fr/',
tags$img(src='logo.jpg'))
),
dashboardSidebar(
# Adjust the sidebar
tags$style(".left-side, .main-sidebar {padding-top: 200px}"),
),
dashboardBody()
)
server <- function(input, output){}
shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5321 次 |
| 最近记录: |