如何在此处放置徽标?

问题描述 投票:0回答:1

enter image description here

我需要在这个红色的地方放一个标志,我已经尝试过了:

cabecalho <- dashboardHeader(title = "Test", titleWidth = '300px')
cabecalho$children[[2]]$children <-  tags$a(href='http://mycompanyishere.com',
                                                        tags$img(src='logo.png',height='50',width='100'))

但这给了我“测试”标题中的图像。

html css r shiny shinydashboard
1个回答
0
投票

我解决了这个问题,只需将其添加到仪表板标题中:

dashboardHeader(title = "Report", titleWidth = '240px', 
                             tags$li(a(href = 'http://www.site.com.br',
                                       img(src = 'logo.png',
                                           title = "Company Home", height = "30px"),
                                       style = "padding-top:10px; padding-bottom:10px; padding-right:17px;"),
                                       class = "dropdown")
                             
                             )
© www.soinside.com 2019 - 2024. All rights reserved.