纯css写唯美登录页面

在这里插入图片描述
css

    <link href="https://cdn.bootcss.com/font-awesome/5.11.2/css/all.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/animate.css/3.7.2/animate.css" rel="stylesheet">
    <style type="text/css">
        *{
            padding: 0;
            margin: 0;
        }
        body{
            background: url("../img/xhc1.jpg") no-repeat;
            background-size: cover;
        }
        #container{
            display: block;
            width: 600px;
            height: 300px;
            background-color: rgba(0,0,0,0.6);
            margin: 0 auto;
            position: relative;
            top: 250px;
            border-radius: 10px;
        }
        #inner{
            display: none;
            width: 300px;
            height: 300px;
            background-color: #cccccc;
            margin: 0 auto;
            position: relative;
        }
        #inner span{
            display: none;
        }
        .name{
            position: relative;
            left: 200px;
            outline-style: none;
            width: 240px;
            height: 30px;
            border-style: none;
            border-bottom: 2px solid #FFFFFF;
            background-color: rgba(0,0,0,0);
            font-size: 20px;
            color: #FFFFFF;
        }
        .password{
            position: relative;
            left: 200px;
            top: 30px;
            outline-style: none;
            width: 240px;
            height: 30px;
            border-style: none;
            border-bottom: 2px solid #FFFFFF;
            background-color: rgba(0,0,0,0);
            font-size: 20px;
            color: #FFFFFF;
        }
        .login{
            display: block;
            font-size: 35px;
            color: #ffffff;
            text-align: center;
            font-family: Constantia;
            font-weight: bold;
            padding-top: 30px;
            padding-bottom: 20px;
        }

        #check{
            position: relative;
            left: 160px;
            top: 40px;
            width: 240px;
            height: 20px;
            opacity: 0.5;
        }
        .check_text{
            color: rgba(255,255,255,0.5);
            font-size: 17px;
            margin-left: 60px;
            position: relative;
            top: 35px;
        }
        #set{
            position: absolute;
            top: 235px;
            left: 200px;
            width: 110px;
            height: 30px;
            font-size: 17px;
            color: #ffffff;
            text-align: center;
            font-family: Constantia;
            background:linear-gradient(100deg, #ff8b2c, #1eff8f 20%, #dbe2a6, #fdff27) ;
            border-radius: 15px;
        }
        #get{
            border-radius: 15px;
            position: absolute;
            top: 235px;
            left: 330px;
            width: 110px;
            height: 30px;
            font-size: 17px;
            color: #ffffff;
            text-align: center;
            font-family: Constantia;
            background:linear-gradient(100deg, #1c803e, #6464ff 20%,blueviolet, #ff14b1) ;
        }
        .nameicon{
            display: inline-block;
            color: #FFFFFF;
            position: absolute;
            top: 105px;
            left: 170px;
            width: 30px;
            height: 30px;
        }
        .passicon{
            display: inline-block;
            width: 30px;
            height: 30px;
            color: #FFFFFF;
            position: absolute;
            top: 170px;
            left: 170px;
        }
    </style>

html

<div id="container" class="animated bounceInLeft">
    <span class="login">Login</span>
    <span class="nameicon"><i class="fa fa-user-circle"></i></span><input class="name" placeholder="Username" type="text" id="getusername"><br>
    <span class="passicon"><i class="fa fa-key"></i></span><input class="password" placeholder="Password" type="password" id="getpassword"><br>
    <input type="checkbox" id="check"><span class="check_text">记住密码</span><br>
    <input type="button" value="注册" id="set">
    <input type="button" value="登录" id="get">
</div>
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值