1.wrapper * {
2 color: blue;
3 margin: 0 100px; /* Only for demo */
4}
5.myTestClass > * {
6 color:red;
7 margin: 0 20px;
8}
1//Will select all li under ul
2//<ul>
3 <li>
4 <ul>
5 <li></li>
6 <li></li>
7 </ul>
8 </li>
9</ul>
10Affected li = 4
11ul li { margin: 0 0 5px 0; }
12
13//Will only select the childer li of the ul
14//<ul>
15 <li>
16 <ul>
17 <li></li>
18 <li></li>
19 </ul>
20 </li>
21</ul>
22Affected li = 1
23ul > li { margin: 0 0 5px 0; }