मान लें, मुझे एक साधारण चमकदार एप्लिकेशन मिला है और मैं साइडबार पैनल पृष्ठभूमि बदलना चाहता हूं। मैंने सीएसएस के साथ प्रयास किया है, लेकिन मैंने केवल पूरी पृष्ठभूमि को बदलने में कामयाब रहा है। क्या आप मेरी मदद कर सकते हैं?आर चमकदार - साइडबार पैनल की पृष्ठभूमि
मेरे ui.R:
library(shiny)
shinyUI(fluidPage(
includeCSS("www/moj_styl.css"),
titlePanel("Hello Shiny!"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
mainPanel(
plotOutput("distPlot")
)
)
))
और मेरे server.R:
library(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
x <- faithful[, 2] # Old Faithful Geyser data
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
})
और moj_styl.css:
body {
background-color: #dec4de;
}
body, label, input, button, select {
font-family: 'Arial';
}
मुझे लगता है कि ये लिंक हैं जो मुझे मेरे समाधान के लिए प्रेरित करते हैं: http://stackoverflow.com/questions/19777515/r-shiny-mainpanel-display-style-and-font; http://stackoverflow.com/questions/19798048/r-shiny-how-do-you-change-the-background-color-of-the-header – Benjamin
शायद यह जानना अच्छा होगा कि '[]' को छोड़ना होगा और यह कि आप हेक्स-रंगों का उपयोग भी कर सकते हैं जैसे कि '# 003399' – 5th