我想自定义我闪亮的应用程序的盒子状态颜色。 我找到了一种CSS方法来更改这些框的框背景颜色,但不能自定义状态颜色,但是在CSS中看不到 status的等效参数吗? 因此,我打印了一个简单页面的源代码,其中包含考虑的参数状态,并且我正在查看其类(我认为class = box box-solid box-primary),但是我无法达到在此网页提供的几个.css文件中...:(
I would like to customize the color of the box status of my shiny app. I find a css way to change the box background color of these box but not to customize the status color, but I do not see the equivalent argument of "status" in css? I thus print the source code of a simple page containing the considered argument "status" and I was lookin at its class (I think class="box box-solid box-primary") but I do not manage to reach it in the several .css provided in this webpage... :(
您有想法吗?
这是简单的代码:
library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody( fluidRow( box(width = 6, title = "youhou", status = "primary", solidHeader = TRUE, "Box content" ) ) ) ) server <- function(input, output) {} shinyApp(ui, server)在此先感谢您的帮助!
Cha
推荐答案我终于找到了答案(漫长而艰难,但总是令人满足:D)
I finally found the answer (long and tough but always gratifying :D)
我的一个朋友(非常感谢我的朋友!!!)向我展示了如何显示网页(尤其是闪亮页面)每个元素的所有CSS参数:转到相应的页面然后单击鼠标右键,类似检查元素!
One of my friend (Thank you so much my friend !!!) shows me how to display all css parameters of each element of a web page (and particularly of a shiny page: go to the appropriate page and right click, something like "examine the element"!!
太神奇了!!
然后,我看起来更深入(非常非常深入,有很多类!),我设法访问了框的任何css参数!
Then, I look deeper (very very very deeper, there is so much classes !!) and I managed to access to any css parameter of the boxes !
以下是下一个人的代码:
Here is the code for the next people :
library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody( tags$style(HTML(" .box.box-solid.box-primary>.box-header { color:#fff; background:#666666 } .box.box-solid.box-primary{ border-bottom-color:#666666; border-left-color:#666666; border-right-color:#666666; border-top-color:#666666; } ")), fluidRow( box(width = 6, title = "youhou", status = "primary", solidHeader = TRUE, "Box content" ) ) ) ) server <- function(input, output) {} shinyApp(ui, server)有一个不错的选择周末!!
Have a good week-end !!
欢呼!
更多推荐
R ShinyDashboard自定义框状态颜色
发布评论