https://1drv.ms/i/s!Au5bBzCn0l5KgWbgVcV9VZarWU5k?e=JYs03q
时间: 2023-08-06 22:05:56 浏览: 290
好的,我已经查看了您提供的效果图。以下是我为您编写的HTML和CSS代码,以及效果图的静态网页演示。请注意,这只是一个简单的示例,您可以根据需要进行修改和优化。
HTML代码:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>静态网页示例</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div class="logo">
<img src="https://i.imgur.com/JaDzXkf.png" alt="logo">
</div>
<nav>
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">产品</a></li>
<li><a href="#">服务</a></li>
<li><a href="#">关于我们</a></li>
<li><a href="#">联系我们</a></li>
</ul>
</nav>
</header>
<main>
<section class="banner">
<h1>欢迎光临</h1>
<p>这里是一个简单的静态网页示例</p>
<a href="#" class="button">了解更多</a>
</section>
<section class="features">
<div class="feature">
<img src="https://i.imgur.com/9bKIZ8b.png" alt="feature 1">
<h2>功能1</h2>
<p>这里是功能1的描述信息</p>
</div>
<div class="feature">
<img src="https://i.imgur.com/3r6j4RE.png" alt="feature 2">
<h2>功能2</h2>
<p>这里是功能2的描述信息</p>
</div>
<div class="feature">
<img src="https://i.imgur.com/8gI9Wun.png" alt="feature 3">
<h2>功能3</h2>
<p>这里是功能3的描述信息</p>
</div>
</section>
<section class="services">
<h2>我们的服务</h2>
<ul>
<li>服务1</li>
<li>服务2</li>
<li>服务3</li>
<li>服务4</li>
</ul>
</section>
<section class="about-us">
<h2>关于我们</h2>
<p>这里是关于我们的描述信息</p>
</section>
<section class="contact-us">
<h2>联系我们</h2>
<form>
<input type="text" placeholder="姓名">
<input type="email" placeholder="邮箱">
<textarea placeholder="留言"></textarea>
<button type="submit">发送</button>
</form>
</section>
</main>
<footer>
<p>版权所有 © 2021 静态网页示例</p>
</footer>
</body>
</html>
```
CSS代码:
```css
/* 全局样式 */
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
color: #333;
}
/* 头部样式 */
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 50px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.logo img {
height: 50px;
}
nav ul {
display: flex;
}
nav li {
margin-left: 20px;
}
nav li:first-child {
margin-left: 0;
}
nav a {
color: #333;
text-decoration: none;
}
nav a:hover {
color: #f00;
}
/* 主要内容样式 */
main {
padding: 50px;
}
.banner {
text-align: center;
margin-bottom: 50px;
}
.banner h1 {
font-size: 48px;
margin-bottom: 20px;
}
.banner p {
font-size: 24px;
margin-bottom: 40px;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #f00;
color: #fff;
text-decoration: none;
border-radius: 5px;
}
.button:hover {
background-color: #d00;
}
.features {
display: flex;
justify-content: space-between;
margin-bottom: 50px;
}
.feature {
flex-basis: 30%;
text-align: center;
}
.feature img {
height: 100px;
margin-bottom: 20px;
}
.feature h2 {
font-size: 24px;
margin-bottom: 10px;
}
.feature p {
font-size: 16px;
}
.services {
margin-bottom: 50px;
}
.services h2 {
font-size: 24px;
margin-bottom: 20px;
}
.services ul {
list-style: none;
margin: 0;
padding: 0;
}
.services li {
margin-bottom: 10px;
}
.about-us {
margin-bottom: 50px;
}
.about-us h2 {
font-size: 24px;
margin-bottom: 20px;
}
.contact-us {
margin-bottom: 50px;
}
.contact-us h2 {
font-size: 24px;
margin-bottom: 20px;
}
form {
display: flex;
flex-direction: column;
}
form input,
form textarea {
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
form button {
padding: 10px 20px;
background-color: #f00;
color: #fff;
text-decoration: none;
border: none;
border-radius: 5px;
}
form button:hover {
background-color: #d00;
}
/* 底部样式 */
footer {
text-align: center;
padding: 20px;
background-color: #f00;
color: #fff;
}
```
效果图静态网页演示链接:
https://codepen.io/yuanyuanz/pen/OJWJLmM
希望这样可以帮助您!
阅读全文