forked from mt-bjtu-practical/Front-end-exercise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path20281090-肖志锋.html
170 lines (162 loc) · 4.87 KB
/
20281090-肖志锋.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>20281090-肖志锋的登录页面</title>
<style>
*{
margin: 0;
padding: 0;
}
.body{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(200deg,#eaf1d6,#e3eeff);
}
.container{
width: 400px;
height: 600px;
background: linear-gradient(200deg,#eaf1d6,#e3eeff);
border-radius: 5px;
box-shadow: 2px 0 10px rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.login{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
}
input{
background-color: transparent;
width: 70%;
color: #a262ad;
border: none;
border-bottom: 1px solid rgba(255,255,255,0.4);
padding: 10px 0;
text-indent: 10px;
margin: 8px 0;
font-size: 14px;
letter-spacing: 2px;
}
input:focus{
color: #a262ad;
outline: none;
border-bottom: 1px solid #a262ad80;
transition: 0.5s;
}
.container button{
width: 70%;
margin-top: 35px;
background-color: #f6f6f6;
outline: none;
border-radius: 8px;
padding: 13px;
color: #6d843c;
letter-spacing: 2px;
border: none;
cursor: pointer;
}
.login p{
font-size: 18px;
line-height: 18px;
margin-bottom: 20px;
}
.header{
display: flex;
width: 100%;
height: 60px;
padding: 0 20px;
background:linear-gradient(200deg,#eaf1d6,#e3eeff);
align-items: center;
}
.header img{
height: 32px;
cursor: pointer;
}
.choice{
display: flex;
flex-direction: row;
margin-bottom: 20px;
}
.ep-tab_item {
margin: 10px;
font-weight: 400;
font-size: 18px;
color: #666666;
line-height: 18px;
cursor: pointer;
}
.hidden{
display: none;
}
.ep-tab_item.active{
color: black;
}
.ep-protocol {
display: flex;
justify-content: flex-start;
}
.ep-protocol .ep-checkbox-container label {
display: inline-block;
width: 14px;
height: 14px;
border-radius: 2px;
margin-top: 5px;
border: 1px solid rgba(0, 0, 0, 0.13);
position: relative;
cursor: pointer;
text-align: center;
}
.ep-protocol .ep-authorize {
font-size: 14px;
color: #999999;
line-height: 24px;
text-align: left;
margin-left: 8px;
}
</style>
</head>
<body>
<div class="header">
<img src="https://w.meituan.net/v1/mss_0e4451a82e1d428f9fc3b99c0b3ebf15/waimai-e-fe-new-574503a2/production/images/logo-5496ba2ea8.webp" alt="美团外卖配送中心" class="logo">
</div>
<div class="body">
<div class="container">
<div class="choice">
<div class="ep-tab_item active" id="hboxz">
<div>账号登录</div>
</div>
</div>
<div class="login" id="boxz">
<input type="text" placeholder="输入账号" id="zhanghao">
<input type="password" placeholder="输入密码" id="mima">
</div>
<button id="submit">登录</button>
</div>
</div>
<script>
let boxz=document.getElementById('boxz');
let submit=document.getElementById('submit');
let zhanghao=document.getElementById('zhanghao');
let mima=document.getElementById('mima');
submit.addEventListener('click',()=>{
if(boxz.className=="login"){
if(zhanghao.value=="xzf"&&mima.value=="20281090"){
window.alert("登录成功");
}
else{
window.alert("用户名或密码错误");
}
}
})
</script>
</body>
</html>