我認爲有一種方法可以同時修改兩個元素?我試過a b + a c
等,但似乎沒有任何工作。使用多個鏈接選擇器
打字這個最簡單的方法是什麼?
#a #b {
width: 12px;
height: 12px;
background: url('xjpg');
position: absolute;
margin: 111px 0 0 222px;
}
#a #c {
width: 12px;
height: 12px;
background: url('x.jpg');
position: absolute;
margin: 111px 0 0 333px;
}
#a #b,#a #c?。 –
你爲什麼要做#a #b。假設只有一個ID爲#b的元素,直接應該使用#b。無論如何用#a #b#逗號分隔單獨元素,#a #c – 2013-06-23 01:06:14