gpt4 book ai didi

在 R 的 Shiny 侧边栏中删除粗体

转载 作者:行者123 更新时间:2023-12-05 03:05:21 25 4
gpt4 key购买 nike

我是 Shiny 的新手,不知道如何“取消加粗”标签(所附屏幕截图中的进给率和操作)。这是我的 UI 部分代码:

ui <- fluidPage(titlePanel(""),
sidebarLayout(
sidebarPanel(
# adding the new div tag to the sidebar
tags$div(class="header", checked=NA,
tags$h4(strong("Duty"))),
selectInput('id1', 'Feed rate (m^3/h)', c("All", main$metric[1:3])),
selectInput('id2', 'Operation', c("All", main$metric[4:5])),
mainPanel(DT::dataTableOutput("table"))
))

截图如下:

enter image description here

最佳答案

您可以通过 adding your own style sheet 来完成此操作到你 Shiny 的应用程序。首先我们给侧边栏面板一个类sidebar,这样我们就可以引用它。然后我们可以将以下内容添加到文件www/style.css:

.sidebar label {
font-weight: 400;
}

最后,我们将您的fluidPagetheme 参数设置为“style.css”。

ui <- fluidPage(theme="style.css", titlePanel(""),
# content here
))

结果应该是这样的:

enter image description here

关于在 R 的 Shiny 侧边栏中删除粗体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51088687/

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