一个好看的登陆页

站长测评:这个是我无聊时在某个平台看到的一个登陆页,顺手练习了一下写了下来

图片[1]-一个好看的登陆页-游客小圈子

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>1</title>
    <link rel="stylesheet" href="./style.css">
    <link href="https://fonts.googleapis.com/css?family=Quicksand&display=swap" rel="stylesheet">

</head>

<body>

    <div class="container">
        <div class="contact-box">
            <div class="left"></div>
            <div class="right">
                <h2>Contact Us</h2>
                <input type="text" class="field" placeholder="Your Name">
                <input type="email" class="field" placeholder="Your Email">
                <input type="text" class="field" placeholder="Your Phone">
                <textarea class="field area" placeholder="Message"></textarea>
                <button class="btn">Send</button>
            </div>
        </div>

</body>

</html>

css代码

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', sans-serif;
}

body {
    width: 100%;
    height: 100vh;
}

.container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px 100px;
}

.container:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: url("./img/1.jpg") no-repeat center;
    background-size: cover;
    z-index: -1;

}

.contact-box {
    max-width: 850px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    text-align: center;
    background-color: #fff;
    box-shadow: 0px 0px 19px 5px rgba(0, 0, 0, 0.19);
}

.left {
    height: 100%;
    background: url("./img/2.jpg") no-repeat center;
    background-size: cover;
}

.right {
    padding: 25px 40px;
}

h2 {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

h2:after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    height: 4px;
    width: 50px;
    border-radius: 2px;
    background-color: #2ecc71;


}

.field {
    width: 100%;
    padding: 0.5rem 1rem;
    outline: none;
    border: 2px solid rgba(0, 0, 0, 0);
    background-color: rgba(230, 230, 230, 0.6);
    font-size: 1.1rem;
    margin-bottom: 22px;
    transition: .3s;
}

.field:hover {
    background-color: rgba(0, 0, 0, 0.1);

}

.field:focus {
    background-color: #fff;
    border: 2px solid rgba(30, 85, 250, 0.47);
}

.area {
    min-height: 150px;

}

.btn {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    background-color: #2ecc71;
    outline: none;
    border: none;
    color: #000;
    transition: .3s;
}

.brn:hover {
    background-color: #27ea60;

}

@media screen and (max-width:80px) {
    .contact-box {
        grid-template-columns: 1fr;
    }

    .left {
        height: 200px;
    }
}

挺简单的,可以仿照我的基础美化一下,图片啥的我都放原代码包了

一个好看的登陆页-游客小圈子
一个好看的登陆页
此内容为免费资源,请登录后查看
0积分
游客小圈子解压密码:blog.ylikli.com
免费资源
© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容