Change background colour of navbarPage menubar in R shiny

你说的曾经没有我的故事 提交于 2019-12-24 07:42:08

问题


In R Shiny, I would like to change the background colour of the navbar menu. I would like to change the colour everywhere on the menu bar (including the colour of the buttons when hovering over them, or when they're inactive, etc.), except for the font, to one colour (black). However, I do not wish to change any other default colours, such as the background colour of the main part of the page. I've attempted to do so by creating a CSS file as follows:

body, 
#selector, 
.container, 
.navbar-background { background: #000000; }

I've also tried lots of other combinations and parameters, but nothing seems to work. What is the parameter in the CSS file that controls the background colour of the navbar menu bar?

Note that the answer in: How to change navBarPage header background in Zebble? hasn't worked for me.


回答1:


Try

.navbar-default {
    background-color: #b1b1b3 !important;
}

.navbar-default:hover {
    background-color: #aaaaaa !important;
    color: yellow;
}


来源:https://stackoverflow.com/questions/50305668/change-background-colour-of-navbarpage-menubar-in-r-shiny

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!