tabsetPanel中的背景颜色在闪亮

And*_*d_R 12 css r 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()                           
    ))
Run Code Online (Sandbox Code Playgroud)

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

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

jdh*_*son 7

使用以下style选项wellPanel:

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)) })
  }
))
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述