小编are*_*eNg的帖子

更改 R闪亮通知的颜色

我正在尝试使用函数“showNotification”来显示绿色弹出窗口。
官方文档说,你可以使用参数“type”来改变颜色。

type    A string which controls the color of the notification. One of "default" (gray), "message" (blue), "warning" (yellow), or "error" (red).
Run Code Online (Sandbox Code Playgroud)

以前有人尝试过这个吗?
有什么办法可以使用 HTML/HEX 代码吗?

更新
我最终重新着色了单一类型的 showNotifications,如下所示:

 tags$head(tags$style(HTML('
                                                 .shiny-notification-error {
                                                  background-color:#FF5757;
                                                  color:#000000;
                                                 }
                                                  .shiny-notification-message {
                                                  background-color:#B5E26F;
                                                  color:#000000;
                                                 }
                                                 '))),
Run Code Online (Sandbox Code Playgroud)

r shiny shinywidgets

4
推荐指数
1
解决办法
1127
查看次数

标签 统计

r ×1

shiny ×1

shinywidgets ×1