(来自闪亮的Google网上论坛的交叉发布)
有人可以将我指向必须修改发光仪表板颜色的标签名称吗?
从http://rstudio.github.io/shinydashboard/appearance.html#long-titles修改,这会将我的仪表板的左上角更改为橙色
tags$head(tags$style(HTML('
.skin-blue .main-header .logo {
background-color: #f4b943;
}
.skin-blue .main-header .logo:hover {
background-color: #f4b943;
}
')))
我不清楚如何将标题和侧边栏的其余部分更改为橙色,以及当“ SideBarMenu”上的一个项目被选中/突出显示时如何更改颜色。
根据您发布的示例,您可以尝试链接:
用户界面
dashboardPage(
dashboardHeader(
title = "Example of a long title that needs more space",
titleWidth = 450
),
dashboardSidebar( sidebarMenu(
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Widgets", icon = icon("th"), tabName = "widgets",
badgeLabel = "new", badgeColor = "green")
)),
dashboardBody(
# Also add some custom CSS to make the title background area the same
# color as the rest of the header.
tags$head(tags$style(HTML('
/* logo */
.skin-blue .main-header .logo {
background-color: #f4b943;
}
/* logo when hovered */
.skin-blue .main-header .logo:hover {
background-color: #f4b943;
}
/* navbar (rest of the header) */
.skin-blue .main-header .navbar {
background-color: #f4b943;
}
/* main sidebar */
.skin-blue .main-sidebar {
background-color: #f4b943;
}
/* active selected tab in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu .active a{
background-color: #ff0000;
}
/* other links in the sidebarmenu */
.skin-blue .main-sidebar .sidebar .sidebar-menu a{
background-color: #00ff00;
color: #000000;
}
/* other links in the sidebarmenu when hovered */
.skin-blue .main-sidebar .sidebar .sidebar-menu a:hover{
background-color: #ff69b4;
}
/* toggle button when hovered */
.skin-blue .main-header .navbar .sidebar-toggle:hover{
background-color: #ff69b4;
}
')))
)
)
我对CSS进行了评论,以指出其修改内容。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句