div { background: white; }
.red { background: red; }
.red.green { background: green; }<div class=”red green”><span></span></div> //同一级别的class,但是会优先green。也就是green覆盖red。
.red .green { background: green; } //.red类的子元素 green 比如 <div class=red><span class=”green”></span></div>