给 div 元素添加背景色 background-color属性可以设置元素的背景颜色。 例如,你想将一个元素的背景颜色改为green,可以在你的style里面这样写: .green-background { background-color: green; }