因此下面的代码将标题写在 Logo 下,而我希望它位于 Logo 前面。在 RStudio 的 titlePanel 帮助中,没有关于定位标题的帮助。有什么破解方法吗?
shinyUI(fluidPage(
list(tags$head(HTML('<img src="http://ic.pics.livejournal.com/oddharmonic/554743/66688/66688_600.gif" border="0" style="border:2px width="10" height="10" alt="Photo of Milford Sound in New Zealand!" />'))),
div(style="padding: 0px 0px",
titlePanel(
title="University of Wisconsin-Madison Database Group", windowTitle="FML"
)
),
现在是这样的:
最佳答案
这是我能想到的。你可以包装你的 <img />
<h1>...</h1>
内的标签如下:
server <- function(input,output,session){
}
ui <- shinyUI(fluidPage(
list(tags$head(HTML('<h1> <img src="http://ic.pics.livejournal.com/oddharmonic/554743/66688/66688_600.gif" border="0" style="border:2px width="10" height="10" alt="Photo of Milford Sound in New Zealand!"/> University of Wisconsin-Madison Database Group</h1>')))
))
shinyApp(ui = ui, server = server)
关于html - 在 Shiny R 中,如何在 Logo 前面而不是在其下方显示标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28650735/