我正在开发一个 Shiny 的应用程序,并且已经实现了我的进度条,并使用 .progress
、.progess-bar
和 .progress 对其进行了修改-text
在我的 CSS 中。我几乎得到了我想要的,但我只需要去掉带 x 的灰色弹出框(见附图)。
我尝试了多种不同的 CSS 组合,但都没有成功。有人知道这个盒子的 CSS ID 吗?
例子:
界面:
ui <- shinyUI(fluidPage(
includeCSS("www/styles.css"),
plotOutput('plot', width = "300px", height = "300px"),
actionButton('goPlot', 'Go plot')
))
服务器:
server <- function(input, output) {
output$plot <- renderPlot({
input$goPlot
dat <- data.frame(x = numeric(0), y = numeric(0))
withProgress(message = 'Making plot', value = 0, {
n <- 1000
for (i in 1:n) {
dat <- rbind(dat, data.frame(x = rnorm(1), y = rnorm(1)))
incProgress(1/n, detail = paste("Doing part", i))
}
})
plot(dat$x, dat$y)
})
}
CSS
.progress{
position:fixed;
bottom:50px;
left:25%;
width:50%;
}
.progress-bar{
background-color:#000;
}
.progress-text{
position:fixed;
bottom:60px;
left:25%;
font-size:25px;
}
最佳答案
您可以将此添加到您的 CSS,它将隐藏通知:
.shiny-notification{
position:fixed;
left:-100px;
width:0px;
}
关于css - R Shiny 进度框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41580354/