红框区域总是白色,希望是浅绿色
<link rel="stylesheet" href="style.css">
<body>
<div id="wrapper">
<div id="header"> 我是header </div>
<div id="middle">
<div id="sidebar">
<div class="subject-main-container">
<div class="subject-top-container">春</div>
<div class="subject-bottom-container">
<div>2</div>
<div>3</div>
<div>4</div>
</div>
</div>
<div class="subject-main-container">
<div class="subject-top-container">夏</div>
<div class="subject-bottom-container">
<div>5</div>
<div>6</div>
<div>7</div>
</div>
</div>
<div class="subject-main-container">
<div class="subject-top-container">秋</div>
<div class="subject-bottom-container">
<div>8</div>
<div>9</div>
<div>10</div>
</div>
</div>
<div class="subject-main-container">
<div class="subject-top-container">冬</div>
<div class="subject-bottom-container">
<div>11</div>
<div>12</div>
<div>1</div>
</div>
</div>
</div>
<div id="content">
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
<div class="container">
<div class="image"></div>
<div class="author">作者</div>
<div class="date">2024/11/11</div>
</div>
</div>
</div>
<div id="footer">我是 footer</div>
</div>
</body>
body{
margin:0;
}
div#wrapper{
margin:0 auto;
width:1000px;
background:lightgreen;
}
div#header{
height:120px;
width:1000px;
background:lightblue;
}
div#middle{
}
div#sidebar{
width:240px;
float:left;
background:lightgreen;
}
div#content{
width:760px;
float:left;
background:cyan;
}
div#footer{
height:100px;
width:1000px;
float:left;
background:lightblue;
}
.subject-main-container {
width: 240px;
}
.subject-top-container {
background-color: darkgreen;
width: 240px;
height: 70px;
border-radius: 150px;
text-align:center;
color:white;
font-size:60px;
}
.subject-bottom-container {
background-color: lightgreen;
width: 240px;
margin-left:20px;
margin-top:-5px;
padding:20px 10px;
}
.subject-bottom-container div{
font-size:22px;
line-height:30px
}
div.subject-main-container .subject-bottom-container{
display:none;
}
div.subject-main-container:hover .subject-bottom-container{
display:block;
}
.container {
width: 150px;
height: 210px;
text-align: left;
float:left;
margin-left:15px;
}
.image {
width: 150px;
height: 150px;
border-radius: 10px;
background:black;
}
.author {
font-weight: bold;
font-size:25px;
}
.date {
font-size: 16px;
color:grey;
}