[英]How do i change the navbar color?
只是想學習 asp.net core mvc 並想知道我如何從默認的 _Layout 為導航欄提供自定義背景顏色。
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-dark bg-dark border-bottom box-shadow mb-3">
navbar
是引導程序風格的一部分。
你在這里幾乎沒有選擇。
navbar
。您可以嘗試更改布局中類navbar
的顏色。您最好添加!important
否則 css 可能會被其他 css 覆蓋。例如:
<style>
.navbar {
background-color: green !important;
}
</style>
或者您可以創建一個新類並將該類添加到您想要的導航欄:
<nav class="customClass navbar navbar-expand-sm navbar-toggleable-sm navbar-dark bg-dark border-bottom box-shadow mb-3">
<style>
.customClass {
background-color: green !important;
}
</style>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.