课程代码
This commit is contained in:
67
web_test/test6/login.css
Normal file
67
web_test/test6/login.css
Normal file
@@ -0,0 +1,67 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100vh;
|
||||
background-image: url('../images/bg1.jpg');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
width: 400px;
|
||||
background-color: rgba(255, 255, 255, 0.6);
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form div {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.user-type-label {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
38
web_test/test6/login.html
Normal file
38
web_test/test6/login.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!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="./login.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 登录 -->
|
||||
<div class="form-container">
|
||||
<h2>欢迎登陆</h2>
|
||||
<form class="form">
|
||||
<div>
|
||||
<label for="username">用户名:</label>
|
||||
<input type="text" name="username" placeholder="请输入用户名" required><br>
|
||||
</div>
|
||||
<div>
|
||||
<label for="password">密码:</label>
|
||||
<input type="password" name="password" placeholder="请输入密码" required><br>
|
||||
</div>
|
||||
<div>
|
||||
<label class="user-type-label">用户类型:</label>
|
||||
<input type="radio" name="userType" value="1" checked>普通用户
|
||||
<input type="radio" name="userType" value="2">管理员
|
||||
</div>
|
||||
<div>
|
||||
记住我<input type="checkbox" name="rememberMe">
|
||||
</div>
|
||||
<button type="submit"><a href="../test5/index.html">登录</a></button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
67
web_test/test6/register.css
Normal file
67
web_test/test6/register.css
Normal file
@@ -0,0 +1,67 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100vh;
|
||||
background-image: url('../images/bg1.jpg');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
width: 400px;
|
||||
background-color: rgba(255, 255, 255, 0.6);
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form div {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.user-type-label {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
38
web_test/test6/register.html
Normal file
38
web_test/test6/register.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!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="./register.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="form-container">
|
||||
<h2>注册</h2>
|
||||
<form class="form">
|
||||
<div>
|
||||
<label for="username">用户名:</label>
|
||||
<input type="text" name="username" placeholder="请输入用户名" required><br>
|
||||
</div>
|
||||
<div>
|
||||
<label for="password">密码:</label>
|
||||
<input type="password" name="password" placeholder="请输入密码" required><br>
|
||||
</div>
|
||||
<div>
|
||||
<label for="password">密码:</label>
|
||||
<input type="password" name="password" placeholder="请再次输入密码" required><br>
|
||||
</div>
|
||||
<div>
|
||||
<label class="user-type-label">用户类型:</label>
|
||||
<input type="radio" name="userType" value="1" checked>普通用户
|
||||
<input type="radio" name="userType" value="2">管理员
|
||||
</div>
|
||||
<button type="submit"><a href="../test5/index.html">注册</a></button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user