Fri Sep 30 2022

Login Form with Transform Effect

CSS3450 views
Login Form with Transform Effect

File Name: index.html

<!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 Form Design</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=Work+Sans&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            outline: 0;
            font-family: 'Work Sans', sans-serif;
        }

        body {
            background-image: linear-gradient(35deg, #f15e64, #eaa404);
        }

        section {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        section aside {
            width: 350px;
            padding: 20px;
            background-color: #fff;
            border-radius: 3px;
            box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.5);
        }

        section aside h1 {
            font-size: 30px;
            color: #363636;
            text-align: center;
        }

        section aside h2 {
            font-size: 20px;
            text-align: center;
            margin: 10px 0;
            color: #555;
            font-weight: normal;
        }

        input[type=text],
        input[type=password] {
            width: calc(100% - 20px);
            padding: 8px 10px;
            font-size: 16px;
            margin: 8px 0;
            color: #363636;
            background-color: #fff;
            border: #c9c9c9 solid 1px;
            border-radius: 3px;
            transition: 0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        input[type=text]:focus,
        input[type=password]:focus {
            transform: scale(1.2);
        }

        button[type=submit] {
            margin: 8px 0;
            width: 100%;
            border: none;
            color: #fff;
            background-color: #f15e64;
            padding: 8px 0;
            font-size: 18px;
            border-radius: 3px;
            cursor: pointer;
            transition: 0.2s all ease-in-out;
        }

        button[type=submit]:hover {
            background-color: #eaa404;
        }

        section aside p {
            font-size: 16px;
            text-align: center;
            margin-top: 10px;
            color: #555;
        }

        section aside p a {
            color: #f15e64;
            text-decoration: underline;
        }

        section aside p a:hover {
            text-decoration: none;
        }
    </style>
</head>
<body>
    <section>
        <aside>
            <h1>Login</h1>
            <h2>Please enter your credentials</h2>
            <form action="">
                <input type="text" placeholder="Username" />
                <input type="password" placeholder="Password" />
                <button type="submit">Login</button>
            </form>
            <p>Not Yet Registered? <a href="">Sign Up</a></p>
        </aside>
    </section>
</body>
</html>

Result Screenshot(s)

Login Form with Transform EffectWorking Sample0
Reference:

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.