CSS 使用不在 get all with pattern



我的索引中有这种样式.css :

.sidebar-5 {
    background-color: #EDEDED;
    border: 1px solid #999999;
    float: right;
    height: 214px;
    width: 498px;
    border-radius:none !important;
}

我可以使用这种样式来设置sidebarbox-sml的所有类

[class^="sidebar"] , [class^="box-sml"]  :not(#sidebar-5) {
   border-radius: 7px 7px 7px 7px; 
}

[class^="sidebar"] :not(#sidebar-5), [class^="box-sml"] {
   border-radius: 7px 7px 7px 7px; 
}

我想将not()用于跳过#sidebar-5元素,但我做不到。 如何解决这个问题?

使用这个:

#sidebar-5{
      border-radius: 0px 0px 0px 0px !important;
    }

或者,如果它是一个类:

   .sidebar-5{
      border-radius: 0px 0px 0px 0px !important;
    }

最新更新