繁体   English   中英

tabsetPanel中的背景颜色在闪亮

[英]Background color in tabsetPanel in Shiny

如何在tabsetPanel获得白色背景。 为了更好地理解我的问题,我将提出一个例子:

在我的ui.R文件中,我有以下内容:

mainPanel( wellPanel(wellPanel(plotOutput("densityPlot", height="500px"))), 
                               wellPanel(tabsetPanel(type = "tabs", 

        tabPanel(h5("Text1"),p("Text" )),
        tabPanel(h5("Text2"), p("Text") ),                   
        tabPanel(h5("Text3"), p("Text"))),
        br(),
        br(),
        br()                           
    ))

为了更清楚,请看下面的图片: 在此输入图像描述

区别在于任何tagPanel内部的白色背景区域。 这种灰色和白色的组合是个问题。 有谁有想法,我怎么能得到这样的tagPanals。

wellPanel上使用style选项:

runApp(list(
  ui = fluidPage(
    titlePanel("Hello Shiny!"),
    sidebarLayout(
      sidebarPanel(
        numericInput('n', 'Number of obs', 100)
      ),
      mainPanel( wellPanel(wellPanel(plotOutput("densityPlot", height="500px"))), 
                 wellPanel(style = "background-color: #ffffff;", tabsetPanel(type = "tabs", 

                                       tabPanel(h5("Text1"),p("Text" )),
                                       tabPanel(h5("Text2"), p("Text") ),                   
                                       tabPanel(h5("Text3"), p("Text"))),
                           br(),br(),br()                           
                 ))
    )
  )
  ,
  server = function(input, output) {
    output$densityPlot <- renderPlot({ hist(runif(input$n)) })
  }
))

在此输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM