我在Shiny中有一个selectInput
小部件。如何分别控制字体大小风格的标签和选择文本selectInput在Shiny中?
我要控制的字体大小分别同时为label
参数,以及用于小部件本身的输入文本(即,的choices
和selected
参数的文本)。
初始[样式更少]输出看起来是这样的:
selectInput(inputId = "inId", label = "Different Font Size...", choices = "...From This")
我尝试使用div()
像这样:
div(style = "font-size: 8px",
selectInput(inputId = "inId", label = "Different Font Size...", choices = "...From This")
)
哪个缩小双方label
文字和输入文字(即choices
的文字)。
注:这是在对比使用这种方法
div(style = ...)
为textInput
,这不是仅仅影响了label
文本(而不是输入文字)。在这种情况下,我会然后使用
tags$style("#inId {font-size:8px;}")
继textInput
函数分别修改输入字体大小。div(style = "font-size: 8px", textInput(inputId = "inId", label = "Different Font Size...", value = "...From This") ), tags$style("#inId {font-size:14px;}")
然而,这并不使用selectInput()
不工作。
指定一个
tag$style(...)
下一个div(style = ...)
包装似乎并没有做任何事情来得到的文本样式。div(style = "font-size: 8px", selectInput(inputId = "inId", label = "Different Font Size...", choices = "...From This") ), tags$style("#inId {font-size:14px;}") )
那么,如何做到这一点?
我如何控制文本样式(特别是字体大小)分别为label
和choices
文字使用有光泽selectInput
小部件?
如果它的事项:我使用shiny_1.0.3与R版本3.4.0