0
我使用Bootstrap導航欄並希望它以880px寬度切換/摺疊。我試圖添加媒體查詢880px寬度,但它沒有奏效。這是我的CSS代碼:以特定寬度摺疊/切換Bootstrap導航欄
@media (min-width: 880px) {
.navbar-collapse {
width: auto !important;
border-top: 0 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.navbar-collapse.collapse {
display: block !important;
height: auto !important;
padding-bottom: 0 !important;
overflow: visible !important;
}
.navbar-collapse.in {
overflow-y: visible;
}
.navbar-fixed-top .navbar-collapse,
.navbar-static-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
padding-right: 0 !important;
padding-left: 0 !important;
}
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: 0 !important;
margin-left: 0 !important;
}
}