Skip to content

Commit

Permalink
Merge pull request #311 from niharikastha/main
Browse files Browse the repository at this point in the history
#2 login form using html and css
  • Loading branch information
IshitaSatpathy authored Oct 29, 2022
2 parents 9e79834 + 2bf58dc commit 30ee8e6
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 0 deletions.
66 changes: 66 additions & 0 deletions AsthaNiharika/login page/LoginForm.html
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>
Binary file added AsthaNiharika/login page/background photo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions AsthaNiharika/login page/style.css
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) ;
}



0 comments on commit 30ee8e6

Please sign in to comment.