1
我想知道如何使用css(tag $ style())更改“radioButton”和“checkboxInput”窗口小部件的样式。更改窗口小部件的样式
任何帮助表示赞赏! 谢谢!
library(shiny)
ui <- shinyUI(fluidPage(
h3("Hi! I would like to know how to change the style of these widgets with css (tag$style)"),
h3("I can change the style of sliders, unfortunately I cannot figure out how to do this with 'radioButtons'
and 'checkboxInput'. I usually inspect HTML-element in my browser and look for the css style, in this case this strategy does not work."),
br(),
br(),
radioButtons(inputId = "ex_radio", label = "How to change my style?",
choices = c("I want to be red when checked", "I want to be green")),
br(),
br(),
checkboxInput(inputId = "ex_checkbox", label = "I'd like to look bit different as well",
value = TRUE),
br(),
br(),
h3("Any help is appreciated :) Thank you!")
))
server <- shinyServer(function(input, output) { })
shinyApp(ui, server)
感谢您提供非常快速的答案! :) 有没有办法改变按钮的蓝色? (不是标签) –
要更改颜色,您可以查看[this post](http://stackoverflow.com/questions/4253920/how-do-i-change-the-color-of-radio-buttons),不确定它可以很容易地用CSS来完成。 – NicE