我一直忙于创建一个网站,但我发现了一个我不知道解决方案的错误。
这是我的 HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>The HTML5</title>
<link rel="stylesheet" href = "style.css">
<style>
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Zieke Site</h1>
</div>
<div class="topnav">
<a href="#">Menu</a>
</div>
<div class="content">
<p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p>
<p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p>
<p>Test</p>
<p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p>
<p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p>
<p>Test</p><p>Test</p>
<p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p>
<p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p><p>Test</p>
<p>Test</p>
<p>Test</p>
</div>
<div class="footer">
<p>Footer</p>
</div>
</div>
</body>
</html>
这是我的 CSS
body {
margin: 0;
}
.topnav {
background-color: #333;
height: 28px;
}
.topnav a {
float: left;
color: white;
padding: 5px 15px;
text-decoration: none;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.header {
background-color: #747474;
text-align: center;
height: 80px;
line-height: 80px;
}
.content {
background-color: rgba(255, 255, 255, 0.9);
text-align: left;
height: Calc(100vh - 182px);
overflow: auto;
}
.footer {
background-color: #747474;
text-align: right;
padding: 1px 20px;
}
.container {
margin: 0 auto;
width: 70%;
}
希望我能在这里找到帮助,我对编码很陌生,所以如果它很容易解决,请不要怪我:D!