Simple HTML Form

HTML Form

Ingredients : 

  • HTML 
  • CSS 

Main Focus Point :

  • CSS 
    • outline
    • border 
    • box-shadow
    • transition
 

HTML
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Input Focus Hover</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="box">

        <input type="text" placeholder="First Name" name="" id="">
        <input type="text" placeholder="Last Name" name="" id="">
        <input type="text" placeholder="Email" name="" id="">
        <input type="text" placeholder="Phone" name="" id="">

        <input type="submit" value="Submit Your Info">

    </div>
</body>
</html>
CSS
* {
    margin    : 0;
    padding   : 0;
    box-sizing: border-box;
}

.box {
    box-sizing: border-box;
    width     : 350px;
    height    : 400px;
    padding   : 40px;
    margin    : 50px auto;
    border    : 1px solid black;
    text-align: center;
}

input {
    margin-bottom: 15px;
    width        : 200px;
    padding      : 10px;
    outline      : none;
    border       : .5px dashed gray;
    border-radius: 10px;
    transition   : .3s ease-in-out;
}

input[type=text]:focus {
    border    : .5px solid blueviolet;
    box-shadow: 0 0 5px 0px blueviolet;
}

input[type=submit]:hover {
    cursor    : pointer;
    border    : .5px solid tomato;
    box-shadow: 0 0 5px 0px tomato;
}

Comments

Popular posts from this blog

Stack

Get Your Geo Location

React | State Toggling