我的UI代码如下:
ui <- navbarPage(
theme = shinytheme("paper"),
title = div(img(src="ballerlablogo.png", style="margin-top: -14px;", height = 50)),
...
)
它工作得很好,但网页选项卡上的标题如下所示:
有没有办法让页面标题为"Baller Lab“而不删除导航栏中的图像或在导航栏中添加"baller lab”文本?
以下是该网站的链接: BallerLab.us
发布于 2018-08-05 02:35:52
使用fluidPage
,您可以使用tags$head
修改网页选项卡上的标题
library(shiny)
library(shinythemes)
ui <- fluidPage(
theme = shinytheme("paper"),
tags$head(HTML("<title>Baller Lab</title>")), #Without company logo
#tags$head(HTML("<title>Baller Lab</title> <link rel='icon' type='image/gif/png' href='ballerlablogo.png'>")), #WIth company logo
navbarPage(title = div(img(src="ballerlablogo.png", style="margin-top: -14px;", height = 50))))
server <- function(input, output, session) {}
shinyApp(ui, server)
https://stackoverflow.com/questions/51688463
复制相似问题