-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery事件.html
144 lines (122 loc) · 3.69 KB
/
jquery事件.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jquery事件</title>
<link href="font-awesome-4.7.0/font-awesome-4.7.0/css/font-awesome.min.css" type="text/css" rel="stylesheet">
<link href="font-awesome-4.7.0/font-awesome-4.7.0/css/font-awesome.css" type="text/css" rel="stylesheet">
<!--<link rel="stylesheet" href="http://fontawesome.io/assets/font-awesome/css/font-awesome.css">-->
<script src="jquery-2.0.0.min.js"></script>
<style>
*{
font-family: Montserrat,sans-serif;
}
body{
margin: 0;
padding: 0;
height: 100%;
background-image:url("背景11.png");
}
.login-box{
position: absolute;
top: 0;
left:-100%;
width: 100%;
height: 100vh;
background-image:linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
transition: 0.4s;
}
.login-form{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
color: white;
text-align: center;
}
.login-form h1{
font-weight: 400;
margin-top: 0;
}
.txtb{
display: block;
box-sizing: border-box;
width: 240px;
background: #ffffff28;
border: 1px solid white;
padding: 10px 20px;
color: white;
outline: none;
margin: 10px 0;
border-radius:6px;
text-align: left;
}
.login-btn{
width: 240px;
background: #2c3e50;
border: 0;
color: white;
padding: 10px;
border-radius: 6px;
cursor: pointer;
}
.hide-login-btn{
color:white;position: absolute;top: 40px;right: 40px;cursor: pointer;font-size: 24px;
opacity: .7;
}
.show-login-button{
position: absolute;
margin-top:12.5%;
display: none;
left: 50%;
transform: translate(-50%,-50%);
color: white;
border: 2px solid;
padding: 10px;
cursor: pointer;
}
.showed{
left: 0;
}
.show-title{
display: none;
margin-top: 12.5%;
font-size: 50px;
text-align: center;
color: white;
}
</style>
</head>
<body>
<div class="show-title">
<i class="fa fa-quora" aria-hidden="true"></i>
<p>Timosithy Rasinski</p>
</div>
<div class="show-login-button">
<i class="fa fa-sign-in" aria-hidden="true">SHOW LOGIN FORM</i>
</div>
<div class="login-box">
<div class="hide-login-btn"> <i class="fa fa-times"></i> </div>
<form class="login-form" action="前端学院.html" method="post">
<h1>Welcome</h1>
<input class="txtb" id="texb" type="text" name="" placeholder="Username" >
<input class="txtb" id="txtc" type="password" name="" placeholder="Password">
<input class="login-btn" type="submit" name="" value="Login">
</form>
</div>
</body>
<script>
$('.show-login-button').slideDown(2000);
$('.show-title').slideDown(2000);
$('.show-login-button').on("click",function () {
$(".login-box").toggleClass("showed");
});
$('.hide-login-btn').on("click",function () {
$(".login-box").toggleClass("showed");
});
$('.login-btn').click(function() {
window.localStorage.id = $('#texb').val();
window.localStorage.password = $('#txtc').val();
});
</script>
</html>