我使用的是當前的代碼正確的語法:不是()CSS
#extra-sidebar , .entry-content:not(#post-262){
background-color: rgba(255,255,255,0.8);
}
它實際上影響了我的#特側邊欄也是我.entry內容完全。 我想提出的#後的262,它由入門內容
謝謝
我使用的是當前的代碼正確的語法:不是()CSS
#extra-sidebar , .entry-content:not(#post-262){
background-color: rgba(255,255,255,0.8);
}
它實際上影響了我的#特側邊欄也是我.entry內容完全。 我想提出的#後的262,它由入門內容
謝謝
請問我在猜測,#post-262
實際上是一個.entry-content
元素的子是正確的受影響的異常(或相反的方式),而且他們不是一樣的?
如果是這樣,您將需要定義一個#post-262
的樣式,該樣式覆蓋背景顏色與容器背後的顏色相同。
IE8和更早版本不支持:不是選擇器。
它最好只覆蓋類與其他類,像這樣:
#extra-sidebar, .entry-content{
background-color: rgba(255,255,255,0.8);
}
.entry-content #post-262{
background: none;
}
那麼的方法是使用
#post-262 {
background-color:#previousvalue!important;
}
無需使用:not()
功能,!important
足以設置優先級。
分別爲'.entry-content:not(#post-262)' – Aravind30790
編寫你的css這個完成取決於你的HTML的樣子。 –