-2
大多数现代网站都有我在找的东西。我希望能够更改我网站不同区域的背景......例如:https://adwords.google.com/intl/en_uk/home/谷歌页面从蓝色变为白色变成不同的白色。如何更改网站的不同块的背景颜色
我该怎么做?
在此先感谢
大多数现代网站都有我在找的东西。我希望能够更改我网站不同区域的背景......例如:https://adwords.google.com/intl/en_uk/home/谷歌页面从蓝色变为白色变成不同的白色。如何更改网站的不同块的背景颜色
我该怎么做?
在此先感谢
他们做的是创造不同的部分,并且每一节不同的背景色。
div {
width: 100%;
height: 150px;
}
#section1 {
background-color: red;
}
#section2 {
background-color: blue;
}
#section3 {
background-color: yellow;
}
<div id="section1">Content for section 1</div>
<div id="section2">Content for section 2</div>
<div id="section3">Content for section 3</div>
谢谢 - 它的作品! :) – Matt1966
是CSS ['背景color'(https://developer.mozilla.org/en-US/docs/Web/CSS/background-color)属性你正在找? –
背景颜色做我认为的整个背景。我希望不同的部分具有不同的颜色 - 如上面的URL :-) – Matt1966
可能的重复https://stackoverflow.com/questions/8704817/how-to-style-a-div-to-have-a-background-color -for-the-the-the-conten整个宽度 – TidyDev