帮我写一个响应式的网站正在建设中的html+css页面
时间: 2023-08-28 22:01:43 浏览: 38
当然可以!以下是一个简单的响应式网站的示例代码,使用HTML和CSS构建:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>正在建设中</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
h1 {
text-align: center;
margin-bottom: 30px;
}
.content {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}
.box {
width: 300px;
height: 300px;
background-color: #f2f2f2;
margin-bottom: 20px;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
}
@media screen and (max-width: 768px) {
.box {
width: 100%;
}
}
</style>
</head>
<body>
<div class="container">
<h1>网站正在建设中</h1>
<div class="content">
<div class="box">
<h2>功能一</h2>
<p>功能一的描述</p>
</div>
<div class="box">
<h2>功能二</h2>
<p>功能二的描述</p>
</div>
<div class="box">
<h2>功能三</h2>
<p>功能三的描述</p>
</div>
</div>
</div>
</body>
</html>
```
这是一个简单的正在建设中页面,使用了一个容器 `.container` 来限制内容的宽度,并在视窗较小的情况下使盒子 `.box` 宽度为100%。你可以根据实际需求进行修改和扩展。
希望对你有所帮助!如果你有任何其他问题,请随时问我。