首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在shinydashboard嵌入图片

在shinydashboard嵌入图片
EN

Stack Overflow用户
提问于 2020-04-30 11:53:56
回答 1查看 26关注 0票数 0

问题:,我想在标题的右上角添加第二张图片。目前,我可以把一个在左上角,但不能在右上角。

有什么建议怎么做吗?

代码语言:javascript
复制
## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(
                  header = dashboardHeader( titleWidth = NULL,
                                            title = tags$b("Testapp",
                                                           tags$a(href = 'https://www.google.com/', 
                                                                  tags$img(src = 'mick.png', height = 50, width = 50, align = "left"))
                                            ),

                                              ## QUESTION: how can I add the picture to the top right corner
                                             tags$head(tags$img(src = 'mick.png', height = 50, width = 50, align = "right"))



  ),
  dashboardSidebar(),
  dashboardBody()
)

server <- function(input, output) { }

shinyApp(ui, server)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-04-30 12:07:49

Shinydashboard需要一个带有类lidropdown元素。如果我们给它(用下面的tags$head(...)代替):

代码语言:javascript
复制
tags$li(tags$img(src = 'mick.png', height = 50, width = 50, align = "right"), class = "dropdown")

它起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61522773

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档