css仿掘金账户密码登录

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
<!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>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    body {
        background-color: #e9e9e9;
    }

    .login-form {
        width: 370px;
        margin: 100px auto;
        padding: 24px;
        background-color: #fff;
        position: relative;
    }

    h2 {
        color: #333;
        font-size: 18px;
        margin-bottom: 24px;
    }

    input {
        outline: none;
        padding: 10px;
        margin-bottom: 10px;
        width: 100%;
        border: 1px solid #e9e9e9;
        border-radius: 2px;
        outline: none;
        box-sizing: border-box;
        font-size: 16px;
    }
    input:focus{   
        border-color: #007fff;
    }

    img{
        width: 120;
        height: 95px;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%,-50%);
    }

    .form-tel img{
        height: 113px;
    }
    .form-password img{
        width: 103px;
        height: 84px;
    }

    .form-item img{
        display: none;
    }
    .form-item:focus-within ~ img { /* 重点 focus-within 表示一个元素获得焦点或该元素的后代元素获得焦点就会匹配上 */
        display: none;
    }
    .form-item:focus-within img { 
        display: block;
    }

    .btn-submit{
        width: 100%;
        height: 40px;
        color: #fff;
        background-color: #007fff;
        border-radius: 2px;
        outline: none;
        box-sizing: border-box;
        cursor: pointer;
        margin-top: 10px;
        border: none;
        padding: 8px 20px;
    }

</style>
<body>
    <div class="login-form">
        <h2>账密登录</h2>
        <div class="form-item form-tel">
            <input maxlength="64" placeholder="邮箱/手机号(国际号码加区号)">
            <img src="https://sf3-scmcdn2-tos.pstatp.com/xitu_juejin_web/img/greeting.1415c1c.png" class="greeting">
        </div>
        <div class="form-item form-password">
            <input class="form-password" type="password" maxlength="64" placeholder="请输入密码">
            <img src="https://sf3-scmcdn2-tos.pstatp.com/xitu_juejin_web/img/blindfold.58ce423.png" class="blindfold">
        </div>
        <img src="https://sf3-scmcdn2-tos.pstatp.com/xitu_juejin_web/img/normal.0447fe9.png" class="normal">
        <button class="btn-submit">登录</button>
    </div>
</body>

</html>
阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: CSS

“css仿掘金账户密码登录” 的相关文章