写个好看的系统主页面html
时间: 2023-06-20 13:05:38 浏览: 55
以下是一个简单的系统主页面的HTML代码,你可以根据自己的需求修改和美化页面:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>系统名称</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>系统名称</h1>
<nav>
<ul>
<li><a href="#">菜单1</a></li>
<li><a href="#">菜单2</a></li>
<li><a href="#">菜单3</a></li>
<li><a href="#">菜单4</a></li>
</ul>
</nav>
</header>
<main>
<section class="hero">
<h2>欢迎使用系统名称</h2>
<p>系统简介或特点介绍</p>
<a href="#" class="btn">了解更多</a>
</section>
<section class="features">
<div class="feature">
<h3>特点1</h3>
<p>特点1介绍</p>
</div>
<div class="feature">
<h3>特点2</h3>
<p>特点2介绍</p>
</div>
<div class="feature">
<h3>特点3</h3>
<p>特点3介绍</p>
</div>
</section>
<section class="cta">
<h2>立即使用系统名称</h2>
<a href="#" class="btn">立即注册</a>
</section>
</main>
<footer>
<p>版权信息</p>
</footer>
</body>
</html>
```
注释:
- `<header>`:页面头部,包含系统名称和菜单。
- `<main>`:主要内容区域,包含页面主要元素,如头图、特点介绍、注册按钮等。
- `<footer>`:页面底部,包含版权信息等。
CSS样式表(style.css):
```css
/* 页面整体样式 */
body {
font-family: Arial, sans-serif;
font-size: 16px;
margin: 0;
padding: 0;
}
/* 头部样式 */
header {
background-color: #333;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
}
/* 导航样式 */
nav ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
}
nav li {
margin-right: 20px;
}
nav a {
color: #fff;
text-decoration: none;
}
/* 主要内容区域样式 */
.hero {
background-image: url('https://picsum.photos/1200/800');
background-size: cover;
background-position: center;
min-height: 400px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
color: #fff;
padding: 50px;
}
.hero h2 {
font-size: 40px;
margin-bottom: 20px;
}
.hero p {
font-size: 20px;
margin-bottom: 40px;
}
.btn {
display: inline-block;
background-color: #fff;
color: #333;
padding: 10px 20px;
border-radius: 5px;
text-decoration: none;
}
.features {
display: flex;
justify-content: space-around;
margin: 50px auto;
max-width: 1200px;
}
.feature {
width: 30%;
padding: 20px;
background-color: #f2f2f2;
border-radius: 5px;
text-align: center;
}
.feature h3 {
font-size: 24px;
margin-bottom: 20px;
}
.feature p {
font-size: 16px;
}
.cta {
background-color: #333;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 50px;
}
.cta h2 {
font-size: 40px;
margin-bottom: 20px;
}
/* 通用样式 */
h1, h2, h3, h4, h5, h6 {
margin: 0;
}
p {
line-height: 1.5;
}
ul, ol {
margin: 0;
padding: 0;
}
/* 响应式布局 */
@media (max-width: 768px) {
nav ul {
flex-direction: column;
}
nav li {
margin: 10px 0;
}
.hero h2 {
font-size: 30px;
}
.hero p {
font-size: 18px;
}
.features {
flex-wrap: wrap;
}
.feature {
width: 45%;
margin: 10px;
}
}
```
以上代码只是一个基础的主页面,你可以根据自己的需求进行修改和美化。