-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #311 from niharikastha/main
#2 login form using html and css
- Loading branch information
Showing
3 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Login Page</title> | ||
<link rel="stylesheet" href="style.css"> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
</head> | ||
|
||
<body> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
<form method="post" action="login.jsp"> | ||
|
||
<div class="box"> | ||
<h1>Login Here</h1> | ||
<div class="input-box"> | ||
<i class="fa fa-phone" ></i> | ||
<input type="tel" placeholder="Mobile No." name="mobno"> | ||
</div> | ||
<div class="input-box"> | ||
<i class="fa fa-key" ></i> | ||
<input type="password" placeholder="Password" id="myInput" name="password"> | ||
<span class="eye" onclick="myEye()"> | ||
<i id="hide1" class="fa fa-eye" ></i> | ||
<i id="hide2" class="fa fa-eye-slash" ></i> | ||
</span> | ||
|
||
|
||
</div> | ||
<button type="submit" class="login-btn">LOGIN</button> | ||
|
||
</div> | ||
|
||
<script> | ||
function myEye(){ | ||
let x = document.getElementById("myInput"); | ||
let y = document.getElementById("hide1"); | ||
let z = document.getElementById("hide2"); | ||
|
||
if (x.type === 'password') { | ||
|
||
x.type = "text"; | ||
y.style.display = "block"; | ||
z.style.display = "none"; | ||
} | ||
else { | ||
x.type = "password"; | ||
y.style.display = "none"; | ||
z.style.display = "block"; | ||
} | ||
} | ||
|
||
</script> | ||
|
||
|
||
</form> | ||
</body> | ||
|
||
|
||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
|
||
} | ||
|
||
|
||
.logobsp{ | ||
margin: 0% 0% -2.4% 32%; | ||
} | ||
body { | ||
background-image: url(background\ photo.jpg); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
font-family: sans-serif; | ||
width: 95%; | ||
height: 90%; | ||
} | ||
|
||
.box { | ||
width: 500px; | ||
background: #18316e; | ||
opacity: 0.9; | ||
/* background: rgba(3, 31, 85, 0.8); */ | ||
margin: 3% auto; | ||
padding: 50px 0px; | ||
color: #fff; | ||
/* box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.5); | ||
*/ | ||
} | ||
|
||
h1 { | ||
text-align: center; | ||
margin-bottom: 40px; | ||
|
||
} | ||
.input-box{ | ||
margin: 31px auto; | ||
width: 80%; | ||
border-bottom: 1px solid #fff; | ||
padding-top: 10px; | ||
padding-bottom: 5px; | ||
} | ||
.input-box input{ | ||
width: 90%; | ||
border: none; | ||
outline: none; | ||
background: transparent; | ||
color: #fff; | ||
} | ||
|
||
::placeholder{ | ||
color: #ccc; | ||
|
||
} | ||
.fa{ | ||
size: 50px; | ||
margin-right: 10px; | ||
} | ||
|
||
.eye{ | ||
position: absolute; | ||
|
||
|
||
} | ||
#hide1{ | ||
display: none; | ||
} | ||
|
||
.login-btn{ | ||
margin: 40px auto 20px; | ||
width: 80%; | ||
display: block; | ||
outline: none; | ||
padding: 10px 0; | ||
border: 1px solid #fff; | ||
|
||
cursor: pointer; | ||
background: transparent; | ||
color: #fff; | ||
font-size: 16px; | ||
} | ||
|
||
button:hover{ | ||
color: black; | ||
background-color:#ccc; | ||
transition: background-color ease-in-out 2s; | ||
transform: scale(1.06) ; | ||
} | ||
|
||
|
||
|