Css 如何在R中对齐图像?
我有一个闪亮的应用程序,标题板上有一个右对齐的徽标,另一个徽标在“页脚”上右对齐。我希望两个图像的大小相同,并且都与同一条“垂直线”对齐Css 如何在R中对齐图像?,css,r,shiny,Css,R,Shiny,我有一个闪亮的应用程序,标题板上有一个右对齐的徽标,另一个徽标在“页脚”上右对齐。我希望两个图像的大小相同,并且都与同一条“垂直线”对齐 库(闪亮) 图书馆(shinythemes) shinyApp( ui我在CSS方面的经验有限,但我相信在你的风格中添加其中一种可能会解决你的问题: style='float:right;' 或 style='text align:right;' 或 样式='position:absolute;right:42px;'(调整像素以满足您的需要) 希望这有帮助
库(闪亮)
图书馆(shinythemes)
shinyApp(
ui我在CSS方面的经验有限,但我相信在你的风格中添加其中一种可能会解决你的问题:
style='float:right;'
或
style='text align:right;'
或
样式='position:absolute;right:42px;'(调整像素以满足您的需要)
希望这有帮助
library(shiny)
library(shinythemes)
shinyApp(
ui <- fluidPage(
theme = shinytheme("simplex"),
titlePanel(
div("Fancy Title",
actionLink(inputId = "gitLab",
label = tags$img(src = "logo_1.svg", width = "40px", height = "40px"),
style = "background-size:cover; background-position:center; position:absolute;right:2em",
onclick = "window.open('https://github.com/')")
)
), # end titlePanel
hr(),
div(
width = 10,
a(href = "https://www.rcsb.org/", "Whatever", target="_blank"),
actionLink(inputId = "ABC",
label = tags$img(src = "logo_2.svg", width = "40px", height = "40px"),
style = "background-size:cover; background-position:center; position:absolute;right:2em",
onclick = "window.open('https://www.rcsb.org/')")
),
br()
), # end fluidPage
server = function(input, output, session){}
) # end shinyApp