侧栏菜单项之间的空间

时间:2018-12-15 10:47:28

标签: r shiny sidebar shinydashboard

我正在创建一个闪亮的仪表板,并且试图在侧栏的不同菜单之间创建空间。下面是我到目前为止为UI编写的代码。

library(shiny)
require(shinydashboard)
library(ggplot2)
library(dplyr)
library(shiny)
library(shinydashboard)

ui <-  dashboardPage(
  dashboardHeader(),
    dashboardSidebar(
      sidebarMenu(
        menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
        menuItem("Visit-us", icon = icon("send",lib='glyphicon'), 
                 href = "http://www.burgerking.co.nz/"),
        sidebarSearchForm(textId = "searchText", buttonId = "searchButton",
                          label = "Search..."),
        fileInput("file1", "Choose CSV File",
                  accept = c(
                    "text/csv",
                    "text/comma-separated-values,text/plain",
                    ".csv")),
        selectInput(
               "select",
               label = h3("Select Channel"),
               choices = c("All", "a", "b", "c"),
               selectize = TRUE,
               selected = "All")
                 )),
    dashboardBody()
  )

有人可以帮我显示如何在侧边栏面板的菜单项之间添加空格

1 个答案:

答案 0 :(得分:0)

dashboardBody()中,添加以下CSS规范:

tags$head(tags$style(".sidebar-menu li { margin-bottom: 100px; }"))

根据需要更改100px