如何在屏幕达到 660px 时隐藏 SideBar Bootstrap

How to hide SideBar Bootstrap when the screen reaches 660px

我试图在放大时隐藏 Bootstrap 的边栏。“@media only screen and (max-width: 660px)”但结果是它自动部署,我这样做不希望发生这种情况。

Este es el código de bootstrap:

@media only screen and (max-width:660px) {
#header {
    height: 160px
}

    #header .brand {
        width: 100%
    }

    #header .user-nav ul {
        padding-left: 0
    }

    #header .toggle-navigation.toggle-left {
        float: left
    }

.sidebar {
    margin-left: -240px
}

.sidebar-toggle {
    margin-left: 0;
    width: 100%
}



.main-content-wrapper {
    margin-left: 0
}

.main-content-toggle-left {
    margin-left: 0px;
}

.sidebarRight {
    top: 160px;
    width: 100%
}

.user-nav ul li {
    font-size: 12px
}


}

this is my html code

使用新的 Class 并插入 可见性:隐藏;

@media(max-width: 660px){
  .hide{
    visibility: hidden;
  }
}


<nav class="sidebar sidebar sidebar-toggle hide">