为什么我在闪亮的应用程序中没有得到相同尺寸的盒子?

问题描述 投票:0回答:1

我试图理解为什么我的应用程序中的框不相等?

这是代码:

    shinyUI(
  navbarPage(
    windowTitle = "Page",
    title = div(img(src = "bare.png", height = "30px"), "Oncology  Toolbox"),
    theme = shinytheme("cerulean"),
    tabPanel(
      "Toolbox", icon = icon("wrench"),
      dashboardPage(
        dashboardHeader(title = "Tools", titleWidth = 300),
        dashboardSidebar(
          width = 300,
          tags$head(HTML(
           
          )),
          br(),
          br(),
          sidebarMenu(
            id = "",
            menuItem("Pathways",
                     tabName = "geneapp", icon = icon("line-chart"),
                     selected = TRUE),
            menuItem("Genomic", tabName = "mutapp",
                     icon = icon("universal-access")),
        dashboardBody(
          tabItems(
            ## Group 1: Pathways
            tabItem(
              tabName = "geneapp",
              fluidRow(
                headerPanel(h3("Analysis")),
                br(),
                column(
                  3,
                  thumbnail_label(
                    url = "RStudio_FLAT/",
                    image = "FluidigmAnalysisToolkit.v2.png",
                    tool = "Fludigm_Browser",
                    label = "Fludigm Browser",
                    content = "Perform Fluidigm data analysis"
                  )
                ),
                column(
                  3,
                  thumbnail_label(
                    url = "home",
                    image = "gtex.png",
                    tool = "GTEx",
                    label = "GTEx Portal",
                    content = "Gene expression in normal tissue"
                  )
                ),
                br(),
           etc.... etc... 

这就是它的样子,正如您所看到的,盒子并不相等。

r shiny shinydashboard shinyapps golem
1个回答
1
投票

由于您没有提供MWE,我只能建议:

  1. div
    添加一个通过
    thumbnail_label()
    函数创建的类,例如
    thumbnail-box
  2. 将 .css 文件添加到您的应用程序并设置该类的 max-height 属性:
.thumbnail-box {
 max-heght: 200px;
}
© www.soinside.com 2019 - 2024. All rights reserved.