gpt4 book ai didi

css - 无法让 Shiny App 中的 Navbar 看起来正常

转载 作者:太空宇宙 更新时间:2023-11-03 18:02:22 25 4
gpt4 key购买 nike

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

enter image description here

标题是“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/

最佳答案

第一个 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){

})
)

enter image description here

关于css - 无法让 Shiny App 中的 Navbar 看起来正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25241162/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com