登录页
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ecommerce Login</title>
<link rel="stylesheet" href="styles.css">
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-image: url("微信图片_20240720110113.png");
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
.login-container {
width: 300px;
padding: 20px;
background: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.5);
background-image: url('');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.login-container h1 {
text-align: center;
color: #333;
margin-bottom: 20px;
}
.login-container form {
display: flex;
flex-direction: column;
}
.login-container form input {
margin-bottom: 15px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
outline: none;
}
.login-container form button {
padding: 10px;
background: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background 0.3s;
}
.login-container form button:hover {
background: #0056b3;
}
.register-link {
text-align: center;
margin-top: 20px;
}
.register-link a {
color: #007bff;
text-decoration: none;
}
.register-link a:hover {
text-decoration: underline;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="login-container">
<h1>欢迎登录</h1>
<form id="login-form">
<input type="email" placeholder="账号" required>
<input type="password" placeholder="密码" required>
<button type="submit">登录</button>
</form>
<div class="register-link">
<p>你没有旧账号? <a href="#">点击注册</a></p>
</div>
</div>
</body>
</html>
运行截图:
![](https://i-blog.csdnimg.cn/direct/f72a08363d3241b2a11a57a105b4f563.png)
主页
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Background with Navigation Bar Example</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #000;
}
.video-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: -1;
}
.content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: white;
font-size: 24px;
}
.navbar {
background: linear-gradient(to right, rgb(100, 3, 3), rgba(231, 28, 28, 0.537));
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: rgba(0, 0, 0, 0.7);
padding: 20px;
z-index: 1;
}
.navbar a {
color: white;
text-decoration: none;
margin-right: 20px;
}
.navbar a:hover {
color: red;
}
</style>
</head>
<body>
<div class="video-background">
<video autoplay muted loop>
<source src="./屏幕录制 2024-07-20 105544.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<div class="navbar">
<a href="#">首页</a>
<a href="#">周年庆</a>
<a href="#">藏宝阁</a>
<a href="#">云·永劫</a>
<a href="#">赛事中心</a>
<a href="#">世界观资料库</a>
<a href="#">专题站</a>
<a href="#">游戏下载</a>
<a href="#">新闻公告</a>
<a href="#">手游下载</a>
</div>
</div>
</body>
</html>
运行截图:
![](https://i-blog.csdnimg.cn/direct/888ee1cd31ed4985a0a52f2f6c79f1e0.png)
浏览页
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<style>
body {
margin: 0;
padding: 0;
background-color: #000;
}
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: white;
font-size: 24px;
}
.navbar {
background: linear-gradient(to right, rgb(100, 3, 3), rgba(231, 28, 28, 0.537));
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: rgba(0, 0, 0, 0.7);
padding: 20px;
z-index: 1;
}
.navbar a {
color: white;
text-decoration: none;
margin-right: 20px;
}
.navbar a:hover {
color: red;
}
.haha {
font-size: 24px;
font-weight: bold;
}
.background-container {
position: relative;
}
</style>
</head>
<body>
<div class="background-container">
<img src="./微信图片_20240720112123.png" alt="Background Image">
</div>
<div class="navbar">
<a href="#">首页</a>
<a href="#">周年庆</a>
<a href="#">藏宝阁</a>
<a href="#">云·永劫</a>
<a href="#">赛事中心</a>
<a href="#">世界观资料库</a>
<a href="#">专题站</a>
<a href="#" class="haha">游戏下载</a>
<a href="#">新闻公告</a>
<a href="#">手游下载</a>
</div>
</div>
</body>
</html>
运行截图:
![](https://i-blog.csdnimg.cn/direct/fff1f76567894a0890d1a32171a71bc9.png)