我想在600 * 600格内放置3 200 * 200的矩形div。分辨率为25像素。我的第一个代码工作正常。但是当我尝试应用第n个孩子(1)和第n孩子(2)它不工作。nth-child(数字)选择器的css没有得到应用
https://jsfiddle.net/user1989/L20fn90L/
,如果我改变风格一部分
#two-parent :nth-child(0){
margin-top:25px;
width:200px;
height:200px;
background-color : black;
float:left;
}
#two-parent :nth-child(1){
margin-top:25px;
position:relative;
width:200px;
height:200px;
background-color : orange;
margin-left:25px;
float:left;
}
孩子选择是没有得到应用。
谢谢den Isahac – smraj