首页 > 解决方案 > Rshiny侧边栏面板和图像位置问题问题

问题描述

我正在尝试创建一个闪亮的应用程序,使其image显示在文本下方,如屏幕截图所示,并sidebar显示在图像下方。现在图像和侧边栏都出现在右侧。

我怎样才能解决这个问题?

用户界面

library(shiny)
library(shinydashboard)
library(shinythemes)
library(shinyWidgets)

ui =    fluidPage(
    #tags$h2("Text"),
    setBackgroundImage(
        src = "Animated.gif"
    ),
    navbarPage("Text", theme = shinytheme("cyborg"),
                  tags$audio(src = "silence.mp3",type = "audio/mp3" ),
               div(p(h1("Objective:"),style="topleft", "Text.")),
               div(p(h2(""),style="topleft", "Text")),
                  uiOutput("all"),
                  mainPanel(
                  
                  ),
tabPanel("Text",
                               icon = icon("chart-area"),
                               img(src="GIF.gif", align = "left",height='90px',width='90px'),
                               sidebarLayout(sidebarPanel(
                                   selectInput("Plotly", "Please select an interactive plot to view:",
                                               choices = c("Plot-1", "Plot-2")),
                                   width = 3,
                                   actionButton("Done", "Done")),
                                   div(plotlyOutput(outputId = "Interactive_Plots",
                                              width = "1024px",
                                              height = "768px"), align = "center")
                  ))))

在此处输入图像描述

标签: rshiny

解决方案


推荐阅读