首页 > 解决方案 > 如何在闪亮的标签面板中对齐元素

问题描述

我想设置标签面板的高度并在其中水平对齐元素。
我没有找到如何继续阅读 tabpanel 文档:

https://shiny.rstudio.com/reference/shiny/0.12.1/tabPanel.html

例如,如果我将解决方案生成的两个并排图像放在这里:

在闪亮的fluidRow中水平居中图像

rm(list = ls())
library(shiny)

server = function(input, output, session) {}

ui <- fluidPage(fluidRow(
  #Change column(x, for desired width
  column(6,
         div(style="display: inline-block; width: 33%;",img(src="https://cran.r-project.org/Rlogo.svg", height=300, width=300)),
         div(style="display: inline-block; width: 33%;",img(src="https://cran.r-project.org/Rlogo.svg", height=300, width=300)),
         div(style="display: inline-block; width: 33%;",img(src="https://cran.r-project.org/Rlogo.svg", height=300, width=300))))
)


shinyApp(ui = ui, server = server)

如果图像的高度不同,如何确保它们对齐?

在此处输入图像描述

谢谢你的帮助

标签: rshinydocumentation

解决方案


推荐阅读