【问题标题】:R Shiny - How to position an image from topR Shiny - 如何从顶部定位图像
【发布时间】:2021-07-10 00:17:54
【问题描述】:

我使用了下面的脚本,但是由于它与标题不在同一行,所以图像没有正确对齐。

如何将徽标从顶部移动到所需位置?

tags$img(src="R.png", height = 50, length = 50, align = "left"),

【问题讨论】:

    标签: r shiny shinydashboard shinyapps shiny-reactivity


    【解决方案1】:

    之前我使用“ShinyUI”,现在改为“dashboardPage”,它本身就解决了问题,图像自动调整和对齐。

    以下是我使用的参数。

    title = tags$a(href = 'https://google.com',
                   tags$img(src = 'logo.png', height= 50,width= 50, align = "left"),
                   'Title')
    
    header = dashboardHeader(title = title, titleWidth = 400)
    
    
    ui = dashboardPage(header, sidebar, body, tags$head(tags$link(rel = "stylesheet", type = "text/css", href = "custom1.css")))
    
    

    感谢 Abhinav...

    watch this video for more details

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-10
      • 2020-01-02
      • 1970-01-01
      相关资源
      最近更新 更多