-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
153 lines (136 loc) · 4.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>清新风格网站模板</title>
<style>
/* 基础样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', '微软雅黑', sans-serif;
}
/* 配色方案 */
:root {
--primary-color: #88c9a1; /* 薄荷绿 */
--secondary-color: #f6f7f3; /* 浅灰白 */
--accent-color: #ff7f50; /* 珊瑚橙 */
}
body {
line-height: 1.6;
color: #4a4a4a;
background-color: var(--secondary-color);
}
/* 导航栏 */
.navbar {
background: white;
padding: 1rem 2rem;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
text-decoration: none;
color: var(--primary-color);
font-weight: 500;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--accent-color);
}
/* 主要内容区 */
.hero {
height: 80vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
background: linear-gradient(45deg, var(--primary-color), #b8e0d2);
margin-top: 60px;
padding: 2rem;
}
.hero h1 {
font-size: 3rem;
color: white;
margin-bottom: 1rem;
}
/* 特色板块 */
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
padding: 4rem 2rem;
background: white;
}
.feature-card {
text-align: center;
padding: 2rem;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0,0,0,0.1);
transition: transform 0.3s;
}
.feature-card:hover {
transform: translateY(-5px);
}
.feature-icon {
font-size: 2.5rem;
color: var(--primary-color);
margin-bottom: 1rem;
}
/* 响应式设计 */
@media (max-width: 768px) {
.nav-links {
display: none;
}
.hero h1 {
font-size: 2rem;
}
.features {
grid-template-columns: 1fr;
}
}
</style>
<!-- 引入Font Awesome图标 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<nav class="navbar">
<ul class="nav-links">
<li><a href="#"><i class="fas fa-home"></i> 首页</a></li>
<li><a href="#"><i class="fas fa-leaf"></i> 产品</a></li>
<li><a href="#"><i class="fas fa-envelope"></i> 联系</a></li>
</ul>
</nav>
<section class="hero">
<div>
<h1>欢迎来到清新世界</h1>
<p style="color: white;">自然 · 简约 · 生活美学</p>
</div>
</section>
<section class="features">
<div class="feature-card">
<i class="fas fa-seedling feature-icon"></i>
<h3>自然设计</h3>
<p>采用环保理念和自然元素的设计方案</p>
</div>
<div class="feature-card">
<i class="fas fa-mobile-alt feature-icon"></i>
<h3>响应式布局</h3>
<p>完美适配各种移动设备</p>
</div>
<div class="feature-card">
<i class="fas fa-palette feature-icon"></i>
<h3>定制主题</h3>
<p>根据需求定制专属配色方案</p>
</div>
</section>
</body>
</html>