私のhtmlには、いくつかのdivがあります。しかし、これらのどれも背景画像を表示していません。もちろん、それは 100% のプロパティが機能していないためです。なぜこうなった?
HTML
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="StyleSheet.css" rel="stylesheet" />
</head>
<body>
<div class="section" id="home">
</div>
<div class="section" id="about">
</div>
<div class="section" id="team">
</div>
<div class="section" id="work">
</div>
<div class="section" id="blog">
</div>
<div class="section" id="contact">
</div>
</body>
</html>
CSS
.section {
height: 100%;
overflow: hidden;
}
#home {
background-image: url(img1.jpg);
}
#about {
background-image: url(img2.jpg);
}
#team {
background-image: url(img1.jpg);
}
#work {
background-image: url(img2.jpg);
}
#blog {
background-image: url(img1.jpg);
}
#contact {
background-image: url(img2.jpg);
}