gpt4 book ai didi

css - R Shiny : center tabsetPanel labels

转载 作者:太空宇宙 更新时间:2023-11-04 10:34:52 24 4
gpt4 key购买 nike

如何将 tabsetPanel 中可见的标签居中?目前我使用 renderUI 定义选项卡:

output$uiTabs <- renderUI({
tabsetPanel(tabPanel("visualization1",tableOutput("table1")),
tabPanel("visualization2",tableOutput("table2"))) })

然后在 UI 中我有这样的东西:

    column(8,align="center",
uiOutput("uiTabs"))

现在表格居中对齐,但选项卡本身不是。

最佳答案

这是我们在 OP 的评论部分讨论的内容

#tabsetPanel holds all of the tabs

tabsetPanel(

#create an empty tab with white text being the label
#Inserting more text will increase the width of the label

tabPanel(tags$div(

HTML(paste(tags$span(style="color:white", "TYPE A LONG STRING HERE TO SPACE ACCORDINGLY"), sep = ""))

)),

#Other tabpanels

tabPanel("visualization1",tableOutput("table1")),

tabPanel("visualization2",tableOutput("table2")),

#Make sure to keep the selected = "tabPanel id" here because
#it will default select the empty panel

selected = "visualization1")

关于css - R Shiny : center tabsetPanel labels,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36213587/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com