CSS   发布时间:2022-04-17  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了css – Shiny App中的可折叠盒子大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
library(shiny)

# Define UI for application that draws a histogram
ui <- fluidPage(

  includeCSS(path = "AdminLTE.css"),#added 
  includeCSS(path = "shinydashboard.css"),#added

   # Application title
   titlePanel("Old Faithful Geyser Data"),# Sidebar with a slider input for number of bins 
   sidebarLayout(
      sidebarPanel(
         sliderInput("bins","number of bins:",min = 1,max = 50,value = 30)
      ),# Show a plot of the generated diStribution
      mainPanel(
         box(plotOutput("distPlot"),solidHeader = T,collapsible = T,title = "collapsible box not collapsing",status = "priMary")
      )
   )
)

# Define server logic required to draw a histogram
server <- function(input,output) {

   output$distPlot <- renderPlot({
      # generate bins based on input$bins from ui.R
      x    <- faithful[,2] 
      bins <- seq(min(X),max(X),length.out = input$bins + 1)

      # draw the histogram with the specified number of bins
      hist(x,breaks = bins,col = 'darkgray',border = 'white')
   })
}

# Run the application 
shinyApp(ui = ui,server = server)

结果是

在上图中,单击mininize按钮时,可碰撞框不会折叠.

我在工作目录中添加了addtional AdminLTE.css和shinydashboard.css文件,但问题仍然存在.

解决方法

仅使用闪亮的可折叠盒子.我们需要添加所需的javascript.在添加css之后我们也添加了 this文件.
includeCSS(path = "AdminLTE.css"),#added

  #add this file and collapsible nature should work.
  includeScript(path = "app.js"),#

大佬总结

以上是大佬教程为你收集整理的css – Shiny App中的可折叠盒子全部内容,希望文章能够帮你解决css – Shiny App中的可折叠盒子所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。