写一个有关元宇宙界面的网页
时间: 2023-12-15 14:04:20 浏览: 27
好的,以下是一个简单的元宇宙界面网页示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>元宇宙</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #222;
color: #fff;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background-color: #333;
position: fixed;
top: 0;
left: 0;
width: 100%;
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
z-index: 1;
}
h1 {
margin: 0;
font-size: 30px;
font-weight: normal;
text-transform: uppercase;
letter-spacing: 2px;
}
nav {
display: flex;
align-items: center;
}
nav a {
color: #fff;
text-decoration: none;
margin-right: 20px;
font-size: 18px;
position: relative;
}
nav a:hover::after {
content: "";
position: absolute;
bottom: -5px;
left: 0;
width: 100%;
height: 2px;
background-color: #fff;
}
main {
margin-top: 100px;
padding: 20px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: flex-start;
max-width: 1200px;
margin: auto;
}
.card {
background-color: #444;
width: 300px;
margin-bottom: 20px;
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.card img {
width: 100%;
height: 200px;
object-fit: cover;
}
.card h2 {
font-size: 24px;
margin: 10px;
}
.card p {
font-size: 16px;
margin: 10px;
line-height: 1.5;
}
.card button {
background-color: #fff;
color: #444;
border: none;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.card button:hover {
background-color: #fff;
color: #222;
}
</style>
</head>
<body>
<header>
<h1>元宇宙</h1>
<nav>
<a href="#">首页</a>
<a href="#">关于我们</a>
<a href="#">联系我们</a>
</nav>
</header>
<main>
<div class="card">
<img src="https://picsum.photos/300/200" alt="卡片图片">
<h2>第一张卡片</h2>
<p>这是第一张卡片的描述。Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut suscipit nisi. Sed vel diam sed velit sodales ultricies. Ut id lacinia velit.</p>
<button>查看详情</button>
</div>
<div class="card">
<img src="https://picsum.photos/300/200" alt="卡片图片">
<h2>第二张卡片</h2>
<p>这是第二张卡片的描述。Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut suscipit nisi. Sed vel diam sed velit sodales ultricies. Ut id lacinia velit.</p>
<button>查看详情</button>
</div>
<div class="card">
<img src="https://picsum.photos/300/200" alt="卡片图片">
<h2>第三张卡片</h2>
<p>这是第三张卡片的描述。Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut suscipit nisi. Sed vel diam sed velit sodales ultricies. Ut id lacinia velit.</p>
<button>查看详情</button>
</div>
<div class="card">
<img src="https://picsum.photos/300/200" alt="卡片图片">
<h2>第四张卡片</h2>
<p>这是第四张卡片的描述。Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut suscipit nisi. Sed vel diam sed velit sodales ultricies. Ut id lacinia velit.</p>
<button>查看详情</button>
</div>
</main>
</body>
</html>
```
这个网页包括一个固定在页面顶部的导航栏和一个包含卡片的主要内容区域。每个卡片都包括一张图片、一个标题、一个描述和一个按钮。你可以根据自己的需求进行修改和定制。