问题
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