-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
160 lines (121 loc) · 3.62 KB
/
index.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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;1,500&display=swap" rel="stylesheet">
<style>
body{
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-flow: column;
padding: 0px;
margin: 0px;
}
#bg-image{
/* background-image: url("/Background change/images/gojo.png") ;
*/
background-image: url("./background image/bc.jpg");
height: 100%;
width: 100%;
background-position: center;
background-size: cover;
overflow: hidden;
}
#text{
height: 400px;
width: 300px;
backdrop-filter: blur(19px) ;
position: absolute;
padding: 50px;
}
.inp{
border-radius: 5px;
padding: 5px;
margin-bottom: 35px;
width: 100%;
font-size: 25px;
}
form:nth-child(1){
text-align: center;
/* border: 2px solid black; */
color: black;
font-family: 'Poppins', sans-serif;
}
input:nth-child(4)
{
background-color: rgba(247, 244, 244, 0.332);
color: rgb(7, 10, 13);
border: none;
margin: 10px 85px;
font-size: large;
box-shadow: 0px 0px 10px 0px;
padding: 8px 20px;
font-weight: bold;
font-family: 'Poppins', sans-serif;
border-radius: 8px;
}
input:nth-child(4):active{
transform: scale(0.96);
}
#form{
/* border: 1px solid black; */
height: 200px;
}
input::placeholder{
color:rgb(22, 16, 18) ;
letter-spacing: 2px;
font-family: 'Poppins', sans-serif;
}
span{
display: block;
font-weight: lighter;
color: red;
font-size: small;
/* border: 2px solid red; */
}
</style>
</head>
<body>
<div id="bg-image"></div>
<div id="text">
<form action="" id="form" onsubmit="return validation()">
<h1>login</h1>
<input type="text" name="" class="inp" id="user" placeholder="User name " >
<input type="text" name="" class="inp" id="pass" placeholder="Password" >
<input type="submit" value="submit" name="" id="submit">
<span id="userspan" class="span" ></span>
<span id="passspan" class="span" ></span>
</form>
</div>
<script>
let user = document.getElementById("user");
let pass = document.getElementById("pass");
let userspan=document.getElementById("userspan");
let passspan=document.getElementById("passspan");
let x = document.getElementsByClassName("span")
function validation() {
if (user.value =="") {
userspan.innerText="user name cann't be empty";
}
else if(user.value.length < 3){
userspan.innerText="user name atleast 3 character";
}
else{
userspan.innerText="";
}
if (pass.value=="") {
passspan.innerText="empty password";
}
else if (pass.value.length<8){
passspan.innerText="pass must be 8 character";
}
}
</script>
</body>
</html>