html/css 登陆网站页面样式

html/css 登陆网站页面样式

<!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>登陆页面</title>
    <link href="登陆页面的样式.css" type="text/css" rel="stylesheet" />
    <script crossorigin="anonymous" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>
    <div class="login-background">
        <div class="login">
            <form action="" method="" id="form">
                <h3>Sign in</h3>
                <div class="signin">
                    <div class="log-signin">usname</div><input type="text" class="inp" name="username" value="">
                </div>
                <div class="signin">
                    <div class="log-signin">passwd</div><input class="inp" type="password" name="password" value="">
                </div>
                <button class="btn-login" type="button">login</button>
                <button class="btn-login" type="submit">submit</button>
                <h4>or sing in with social platforms</h4>
                <div>
                    <ul>
                        <li><a href="#">#</a></li>
                        <li><a href="#">&</a></li>
                        <li><a href="#">$</a></li>
                        <li><a href="#">@</a></li>
                    </ul>
                </div>
            </form>
        </div>
    </div>
</body>
</html>

css代码段

/* * {
    margin: 0;
    padding: 0;
} */
.login {
    position: absolute;
    top: 100px;
    left: 850px;
    width: 300px;
    height: 300px;
    background-color: rgb(228, 236, 238);
    text-align: center;
}
.signin {
    position: relative;
    width: 280px;
    height: 40px;
    background-color: rgb(207, 204, 204);
    border-radius: 50px;
    margin-bottom: 10px;
    margin-left: 10px;
}
.log-signin {
    float: left;
    width: 60px;
    height: 20px;
    line-height: 20px;
    /* background-color: rgb(166, 173, 171); */
    margin-top: 10px;
    margin-left: 20px;
    font-size: 14px;
}
.inp {
    padding: 0;
    /* border: 0; */
    /* 去除input的原有样式 */
    outline: none;
    border: none;
    background-color: rgb(207, 204, 204);
    float: left;
    height: 20px;
    width: 180px;
    margin-top: 10px;
    margin-left: 10px;
}
.btn-login {
    /* 设置登陆按钮样式 */
    border: 0;
    height: 20px;
    width: 80px;
    border-radius: 20px;
    background-color: rgb(166, 173, 171);
}
/* .btn-login::after {
    background-color: rgb(147, 194, 145);
} */
ul li {
    margin-left: 30px;
    border-radius: 20px;
    width: 20px;
    height: 20px;
    float: left;
    list-style: none;
    background-color: rgb(166, 173, 171);
}
ul li a {
    text-decoration: none;
}

 

posted @ 2022-02-22 10:14  甜酒1996  阅读(461)  评论(0)    收藏  举报