【问题标题】:Can't get the Navbar in a Shiny App to look properly无法让闪亮应用程序中的导航栏正常显示
【发布时间】:2014-10-04 03:45:34
【问题描述】:

在我的应用程序中,我使用导航栏。我尝试了来自 Bootswatch.com 的所有免费 CSS Bootstrap 样式表(甚至修改了它们),但我总是这样:

标题是“Instagram 分析器”。第一个菜单项在同一行中,第二个在该行下方移动一行。谁能弄清楚 CSS 代码的哪一部分产生了那个“错误”?

在这张照片中,我使用了“Amelia”风格。

这里是 ui.R 代码:

shinyUI(navbarPage("Instagram Analyzer",
               tabPanel("One User at a Glance",
                        fluidRow( column(width = 12,h1("Instagram Analyzer"))  
                        ),
                        fluidRow( column(width = 4,selectInput("user",label="Instagram User",choices=data)), 
                                  column(width = 8,tableOutput("basics"),tableOutput("z")) 
                        ),
                        fluidRow( column(width = 12,plotOutput("plot"))
                        )
               ),
               tabPanel("Manage Database"),theme="instagram.css"
))

在这里您可以找到样式表: http://bootswatch.com/amelia/

【问题讨论】:

    标签: css r twitter-bootstrap shiny


    【解决方案1】:

    第一个 tabPanel 中的 fluidRow 等需要在容器中:

    library(shiny)
    runApp(list(ui = 
                  navbarPage("Instagram Analyzer",
                             tabPanel("One User at a Glance",
                                      fluidPage(
                                        fluidRow( column(width = 12,h1("Instagram Analyzer"))),
                                        fluidRow( column(width = 4, selectInput("user", label="Instagram User", choices = c(LETTERS[1:4]))), 
                                                  column(width = 8, tableOutput("basics"), tableOutput("z")) 
                                        ),
                                        fluidRow( column(width = 12, plotOutput("plot")))
                                      )
                             )
                             , tabPanel("Manage Database")
                  )
                , server = function(input, output, session){
    
                })
    )
    

    【讨论】:

      猜你喜欢
      • 2016-04-21
      • 2014-08-12
      • 2019-03-16
      • 2019-10-08
      • 1970-01-01
      • 2018-11-20
      • 1970-01-01
      • 1970-01-01
      • 2017-09-19
      相关资源
      最近更新 更多