2017-10-04 38 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

相關問題