即時通訊新的CSS,即時通訊嘗試構建一個非常簡單的網站,我的佈局已經完成,現在的問題是,當我爲divs輸入特定的背景顏色屬性B + C,B和C似乎沒有任何效果,我檢查了其他問題,我知道我應該使用溢出:隱藏;也試過了:都;但他們都沒有工作,你能指出我做錯了什麼?不能改變特定div的背景顏色
<!doctype html>
<html>
<style>
body {
background: url(5750520604_febd0975e8_o.jpg), linear-gradient(180deg, #FFFFFF 80%, #B4B4B4 20%);
background-color: white;
background-size: 70%;
background-attachment: fixed;
background-repeat: no-repeat;
}
#A {
overflow: hidden;
border: none;
}
object {
width: 1500px;
height: 800px;
display: inline-block;
}
#B {
background-color: #777676;
clear: both;
display: flex;
overflow: hidden;
margin-left: -10px;
border: none;
width: 600px;
border: thick;
height: 300px;
display: inline-block;
margin-right: 0px;
float: left;
}
#C {
background-color: #777676;
clear: both;
display: flex;
flex: 0 1 auto;
overflow: hidden;
border: thick;
width: 1250px;
height: 300px;
display: inline-block;
margin-right: -10px;
}
#B+C {
background-color: #777676;
clear: both;
overflow: hidden;
border: none;
width: 1900px;
height: 1000px;
}
.webmaster {
background-color: #777676;
clear: both;
margin-left: -10px;
background-color: white;
overflow: hidden;
height: 80px;
width: 1920px;
border: none;
font-family: Georgia;
text-align: justify;
padding: 20px 640px;
font-size: 20px;
margin-top: -5px;
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #4C4C4C;
}
a:hover {
text-decoration: none;
color: #B2B2B2;
}
a:active {
color: #000000;
text-decoration: underline;
}
</style>
<head>
<meta charset="utf-8">
<title>Rodriguez Tullio Propiedades</title>
</head>
<body>
<div id="A">
<object type="text/html" data="A.html">
</object></div>
<div id="B+C">
</div>
<div id="B">
<object type="text/html" data="B.html">
</object></div>
<div id="C">
<object type="text/html" data="C.html">
</object></div>
<div class="webmaster">2017 | <a href="mailto:[email protected]">[email protected]</a> |</div>
</body>
</html>
甲'+'在CSS是一個[相鄰的兄弟選擇器(https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_selectors),則不應該在你的'IDs'中使用它。 – APAD1
請參考最佳答案[here](http://stackoverflow.com/questions/70579/what-are-valid-values-for-the-id-attribute-in-html) –