The main thing is the background color style. Inheritance is prohibited. Reply to discussion (solution) <br> body { background:#ddd; } <br> div { <br> width :100px; height:100px; <br> border:1px solid red; <br> background:blue; } <br> 123 Change the background of the div you don’t want to inherit Set it up again <br> body { background:#ddd; } <br> div { <br> width:100px; height:100px; <br> border:1px solid red; <br> background:blue; } <br> </styl... <br> <br> <br> This is OK<br> I want to ask, can you remove the parent style inherited by the div instead of giving it to the div? Add a new one that covers the parent. </p> <p class="sougouAnswer"> Lao Lou Browsing and parsing css is like this, unless you develop a browser yourself and prevent css from being inherited. </p> <p class="sougouAnswer"> Quote from the 1st floor’s reply: <br> <br> <!DOCTYPE HTML> <br> <html> <br> <head> <br> <meta charset="gb2312" / > <br> <title></title> <br> <style> <br> body { background:#ddd; } <br> div { <br> width:100px; height:100px; <br> border:1px solid red; <br> background:blu... <br> Probably not. . </p> <p class="sougouAnswer"> Lao Lou Browsing and parsing css is like this, unless you develop a browser yourself and prevent css from being inherited. <br> Crying </p>