Design a static web page with a simple login interface using HTML+CSS

The blogger used HTML+CSS to create a static web page with a simple login interface (PS: This is the homework that our web needs to complete, and it is relatively simple to do, for your reference). The rendering is as follows:

 Below is the code directly:

<!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>Document</title>
    <style>
        *{
            margin:0%;
            padding:0%;
        }
        html{
            height: 100%;
        }
        body{
            height: 100&;
        }
        .container{
            height: 750px;
            background-image: url("1.jpg");
            background-repeat: repeat;
        }
        .login-wrapper{
            width: 540px;
            height: 260px;
            background-color: rgb(255, 255, 255,0.4);
            transform: translate(150%,85%);
            border-radius: 15px;
            position: relative;
        }
        .login-header{
            text-align: center;
            height: 75px;
        }
        .username{
            height: 40px;
            text-align: center;
            font-size: 18px;
        }
        .password{
            height: 40px;
            text-align: center;
            font-size: 18px;
        }
        .login-butter{
            width: 500px;
        }
        .btn{
            width: 95px;
            height: 48px;
            text-align: center;
            font-size: 14px;
            border-radius: 5px;
            background-color:rgb(176,224,230);
            transform: translate(255%,10%);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="login-wrapper">
            <div class="login-header">
                <h1>登录</h1>
            </div>
            <form action="#" method="get">
                <div class="username">
                    账号:<input type="text" name="username">
                </div>
                <div class="password">
                    密码:<input type="password" name="password" >
                </div>
            </form>
            <div class="login-button">
                <button class="btn">确定</button>
            </div>
        </div>
    </div>
</body>
</html>

 (PS: If you want a background picture, you can also private message me directly, and I will give it to you if I see it)

Guess you like

Origin blog.csdn.net/qq_54186956/article/details/126166978