我正在尝试更改(减小)pickerinput 小部件的字体大小,但没有运气。我在线查看了其他解决方案,这些解决方案有助于改变选择选项的大小。但我需要更改选择/选定栏及其下拉菜单选项中显示的字体大小。这是一段简单的代码:
library(shiny)
shinyApp(
ui = fluidPage(
titlePanel("censusVis"),
sidebarLayout(
sidebarPanel(
helpText("Create demographic maps with
information from the 2010 US Census."),
fluidRow(column(6,
pickerInput("var",
label = "Choose a variable to display",
choices = c("Percent White", "Percent Black",
"Percent Hispanic", "Percent Asian"),
selected = "Percent White",
choicesOpt = list(
style = rep_len("font-size: 75%; line-height: 1.6;", 4)
) # choices style
)
))
),
mainPanel(textOutput("text1"))
)
),
server = function(input, output) {}
)
这一行:
choicesOpt = list(style = rep_len("font-size: 75%; line-height: 1.6;", 4)) # choices style
从此链接:https ://github.com/dreamRs/shinyWidgets/issues/74 减小了下拉菜单中的字体大小,但不是选择栏中的选定选项。任何帮助将不胜感激。