gpt4 book ai didi

css - R & Shiny - 边栏文本对齐对齐

转载 作者:行者123 更新时间:2023-11-28 10:30:37 24 4
gpt4 key购买 nike

我已经创建了一个 Shiny 应用程序,您可以在此处查看它: http://www.agristats.eu/en/prices-agricultural-commodities/

此应用程序的 R 代码是 here .问题在于应用程序侧边栏中的文本。它一直隐藏在地 block 后面,所以我需要在侧边栏内对齐它。 enter image description here各自的代码部分是:

sidebar <- dashboardSidebar(sidebarMenu(selectInput('commodity', 'Προϊόν', 
choices = unique(data_quandl$data_product)),
tags$footer(tags$p("This application is based on Quandl data."))))

更令人费解的是,在同一个网站中,我有另一个类似的应用程序,其中相应的侧边栏文本被正确打印。您可以查看应用程序是否正常执行 here .

我该如何解决这个问题?

最佳答案

sidebarMenu 之外添加 footer 将达到如下效果:

sidebar <- dashboardSidebar(sidebarMenu(
selectInput('commodity', 'Προϊόν', choices = unique(data_quandl$data_product))
),
tags$footer(
tags$p("This application is based on Quandl data.")))

输出:

snap1

其他解决方法是使用 div 标签来对齐文本。

sidebar <- dashboardSidebar(sidebarMenu(
selectInput('commodity', 'Προϊόν', choices = unique(data_quandl$data_product)),
div(style="text-align:center","This application is based on",br(), "Quandl Data")
))

这导致:

snap2

关于css - R & Shiny - 边栏文本对齐对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45004874/

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