r - 在 R Shiny 中更改 Inputwindow 的背景颜色
问题描述
我想改变控制面板的背景(你可以在哪里进行输入),但我找不到办法,我可以改变主面板的背景,但这不是我想要的。
我接近了 .shiny-input-container,但灰色的背面仍然存在
library(shiny)
ui <- fluidPage(
tags$head(
# Note the wrapping of the string in HTML()
tags$style(HTML("
.shiny-input-container{
background-color: white;
}
"))
),
titlePanel("Test"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)))
server <- function(input, output) {
output$distPlot <- renderPlot({
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
}
shinyApp(ui = ui, server = server)
解决方案
推荐阅读
- c# - 从一台新机器连接 Oracle 实例时出现问题
- javascript - 无法在 public/index.html 中获取反应应用程序的环境变量
- jsp - WLP:找不到上下文根
- google-apps-script - 如何在 Google 应用程序脚本中使用 SMTP?
- android - 当我使用base64在羽毛笔编辑器中添加图像时,发布应用程序显示灰屏
- azure-data-factory - 如何在 ADF 内的未来活动中使用 Databricks 活动的输出?
- sql - 无法将查询语句保存为视图
- python-3.x - *[, keyword_arg = value] 在 Python 仅关键字函数定义中做了什么?
- javascript - 在 Laravel 中获取控制器的 Javascript 变量
- protocols - 除了 MQTT,还有哪些协议用于通过 Internet 远程控制 IoT 设备?