2017-10-04 39 views
2

我使用shinydashboard,我希望把图像中的标题用下面的代码:删除闪亮的应用程序的标题DIV

header <- dashboardHeader(
    title = div(img(src = 'logo.png', 
        height = 60, 
        width = 120)) 
) 

一切顺利,但是当我通过Chrome中打开的应用程序,在我的浏览器标签中,它看起来像下面那样很奇怪。

enter image description here

有没有办法从显示在浏览器上保持这和显示一些普通的文本?

<div> <img src="logo.png" height="60" width="120"/> 

回答

2

既然你覆盖仪表板的标题,你已经明确提到与tags$title

tags$title('This is my page') 

页面标题为shinydashboard

ui <- dashboardPage(title = 'This is my title', header, sidebar, body, skin='red') 
+0

但我应该在哪里把'标签$ title',我使用shinydashboard,它显示“预期的标签是类型li”,当我把它放在'dashboardHeader'中;当我把它放在'dashboardBody'中时它不起作用。 – rankthefirst

+0

它完美的作品!谢谢! – rankthefirst

相关问题