.box1 .box2 { color: red; } .box1 > .box3 { color: red; } .box1 > .box3:hover { color: blue; } .box1:hover { color: orange; } div .box1 { width: 100px; } .p1, .p2 { width: 100px; height: 200px; } .p2 { color: blue; } .p3 { width: 100px; height: 200px; } .p5 { width: 100px; height: 100px; background-color: #bfa; } div { width: 300px; height: 200px; border: 1px solid red; } span { color: #ff8000; } html { width: 100%; height: 100%; } body { width: 100%; height: 100%; background-color: #bfa; } body:hover { background-color: #69ff44; }