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