HTML CODE



<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <title>LoginForm</title>
  <link rel="stylesheet" type="text/css" href="style.css">
  <link href="https://fonts.googleapis.com/css?family=Cinzel" rel="stylesheet">
 </head>
 <body>
  <div class="bgimg">
   <div class="centerdiv">
    <img src="https://cdn1.iconfinder.com/data/icons/flat-business-icons/128/user-128.png" id="profilepic">
    <h2>user login</h2>
    <form>
     <div>
      <input type="text" name="" class="inputbox" placeholder="Username" required>
     </div>
     <br>
     <div>
      <input type="Password" name="" class="inputbox" placeholder="Password" required>
     </div>
     <br>
     <div>
      <button type="submit"> LOGIN </button>
     </div>
    </form> <br>
   </div>
  </div>  
 </body>
</html>


CSS  CODE


*{
 margin: 0;
 padding: 0;
 font-family:arial;
}

.bgimg{
 width: 100%;
 height: 100vh;
 background-image: linear-gradient(27deg, #004E95 50%, #013A6B 50%);
}

.centerdiv{
 width: 350px;
 height: 360px;
 position: absolute;
 top: 50%;
 left: 50%;
 background-color: red;
 transform: translate(-50%, -50%);
 background-image: linear-gradient(27deg, #013A6B 50%, #004E95 50%);
 box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24);
}

#profilepic{
 width: 120px;
 height: 120px;
 border-radius: 50%;
 position: relative;
 top: -60px;
 left: calc( (350px - 120px) / 2 )
}

h2{
 text-align: center;
 color: white;
 text-transform: uppercase;
 font-size: 2em;
 word-spacing: 10px;
 margin-top: -50px;
 margin-bottom: 50px;
 text-shadow: -2px 2px 1px #0A84C6;
}

.inputbox{
 width: calc(100% - 40px);
 height: 40px;
 display: block;
 margin: auto;
 padding: 0 15px;
 box-sizing: border-box;
 font-size: 15px;
}

::placeholder{
 letter-spacing: 2px;
 color: black;
 font-size: 15px;
}

button{
 width: calc(100% - 40px);
 height: 40px;
 display: block;
 margin: auto;
 color: white;
 background-color: #0A84C6;
 border: none;
 font-size: 15px;
}
button:hover,button:active{
 width: calc(100% - 40px);
 height: 40px;
 cursor: pointer;
 margin: auto;
 color: white;
 background-color:#c72697;
 border: none;
 font-weight: bolder;
 font-size: 17px;
 }


Post a Comment

Previous Post Next Post