简体   繁体   中英

Changing background color of navbar

I have tried using id's for each individual navbar options but the background color wont change only the text in the navbar changes. My required outcome is to get a background color for each navbar option.(Note this is a bootstrap template I am editing). This is a link to my files with what I have tried so far.

您可以使用style="background-color:blue;"添加与 html 内联的style="background-color:blue;"

if you are using the bootstrap template then you can use the following classes

class="bg-primary" // to add blue background.
.bg-secondary // to add gray.
.bg-success   // to add green etc.

to change the text use class="text-primary" and other classes. check out more here(colors) and here (navbar) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM