Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何在R中对齐图像?_Css_R_Shiny - Fatal编程技术网

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