ui <- shiny::bootstrapPage(
shiny::tags$head(
# Include custom CSS
includeCSS("styles.css")
),
shiny::navbarPage(
title = "Test",
collapsible = TRUE,
theme = shinythemes::shinytheme("flatly"),
shiny::tabPanel(
"Map"
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
CSS
.container-fluid {
height: 80px;
}
.leaflet-top .leaflet-control {
margin-top: 40px;
}
.navbar-nav li a {
height: 80px;
}
如何在导航选项卡中使地图文本垂直居中?对于默认主题,我可以让它发挥作用,然而,对于平淡的主题,我无法让它居中。
问题是样式表没有覆盖引导css。为了设计应用程序的样式,必须使用!让它发挥作用很重要。
.container-fluid {
height: 80px !important;
}
.leaflet-top .leaflet-control {
margin-top: 40px !important;
}
.navbar-nav li a {
height: 80px !important;
}