任何人都可以让我知道标签名称来改变蓝线的颜色(请参阅闪亮仪表板中menuItem中的图像.这是更改侧边栏菜单项的bg颜色的代码.
.skin-blue .main-sidebar .sidebar .sidebar-menu .active a{
background-color: rgb(107,194,0);
color: rgb(255,255,255);font-weight: bold;font-size: 18px;
}
同样,寻找自定义蓝线的颜色也是如此
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(
),dashboardSidebar(
sidebarMenu(
menuItem("Folder",tabName = "root",icon = icon("folder")),menuItem("My Home",tabName = "home",icon = icon("home")),menuItem("Document",tabName = "document",icon = icon("document"))
)
),dashboardBody(
tags$head(tags$style(HTML('
/* logo */
.skin-blue .main-header .logo {
background-color: rgb(255,255); color: rgb(0,144,197);
font-weight: bold;font-size: 24px;text-align: Right;
}
/* logo when hovered */
.skin-blue .main-header .logo:hover {
background-color: rgb(255,255);
}
/* navbar (rest of the header) */
.skin-blue .main-header .navbar {
background-color: rgb(255,255);
}
/* main sidebar */
.skin-blue .main-sidebar {
background-color: rgb(255,125,125);;
}
# /* main body */
# .skin-blue .main-body {
# background-color: rgb(0,197);
# }
/* active selected tab in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu .active a{
background-color: rgb(107,0);
color: rgb(255,255);font-weight: bold;font-size: 18px;
}
/* other links in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu a{
background-color: rgb(255,125);
color: rgb(255,255);font-weight: bold;
}
/* other links in the sidebarmenu when hovered */
.skin-blue .main-sidebar .sidebar .sidebar-menu a:hover{
background-color: rgb(232,245,251);color: rgb(0,197);font-weight: bold;
}
/* toggle button color */
.skin-blue .main-header .navbar .sidebar-toggle{
background-color: rgb(255,255);color:rgb(0,197);
}
/* toggle button when hovered */
.skin-blue .main-header .navbar .sidebar-toggle:hover{
background-color: rgb(0,197);color:rgb(255,255);
}
# ')))
))
server <- shinyServer(function(input,output,session) {
})
shinyApp(ui,server)
最佳答案
原文链接:https://www.f2er.com/css/426982.html