如果我有十幾個CSS選擇器和要指派:hover
屬性,所有的人,我已經習慣了這樣做:有沒有辦法將CSS選擇器分組?
selector, selector2, someOtherSelector, someSelector div {
//some properties
}
selector:hover, selector2:hover, someOtherSelector:hover, someSelector div:hover {
//some properties
}
打字:hover
四次似乎是多餘的。有沒有辦法像
(selector, selector2, someOtherSelector, someSelector div):hover {
//some properties
}
而不是?
一個有趣的相關問題,btw:http://stackoverflow.com/questions/800779/why-cant-you-group-descendants-in-a-css-selector?rq=1 – 2016-07-18 19:29:19