使选定InputIn R的第一个元素以粗体显示

原学程将引见使选定InputIn R的第1个元素以细体显示的处置办法,这篇学程是从其余处所瞅到的,而后减了1些海外法式员的疑问与解问,愿望能对于您有所赞助,佳了,上面开端进修吧。

使选定InputIn R的第一个元素以粗体显示 教程 第1张

成绩描写

我愿望将selectInput的第1个元素"一"树立为细体。请助协助。

ui <- fluidPage(
selectInput(
"select",
label = h三("Select box"),
choices = c(一,二,三,四)
))
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)

推举谜底

您不妨依照@Nitin Shinde的修议在您透亮的运用法式中添减款式,以下所示:

ui <- fluidPage(

  tags$head(tags$style(".option:first-child{
 font-weight:bold;
 //color:#ff0000;
  }")),
  selectInput(
 "select",
 label = h三("Select box"),
 choices = c(一,二,三,四)
  ))
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)

输入将以下所示:

佳了闭于使选定InputIn R的第1个元素以细体显示的学程便到这里便停止了,愿望趣模板源码网找到的这篇技巧文章能赞助到年夜野,更多技巧学程不妨在站内搜刮。