我创建了我的Shiny应用程序,我只在Shiny应用程序顶部添加了一个png.file,我希望在中心位置看到它。 我使用代码:
img(src = "logo.png", align = "center")
或
img(src = "logo.png", align = "centre")
但它不起作用。 怎么做?
答案 0 :(得分:0)
这可能就是你所追求的:https://github.com/rstudio/shiny/issues/555
对不起,这太晚了!
AB
对齐属性不是您需要的。这是一个不同的 东西(http://www.w3schools.com/tags/att_img_align.asp)。您可以使用 style =“display:block; margin-left:auto; margin-right:auto;”至 以图像为中心。或div(img(...),style =“text-align:center;”)。