CSS-动态水滴登录页面(附源码)

先看效果吧: (鼠标触碰到都是会动的噢~)

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>Document</title>
    <link rel="stylesheet" href="/yaoNan.css">
</head>
<body>
    <div class="box">
        <div class="content">
            <h2>登录</h2>
            <div>
                <input type="text" placeholder="请输入用户名">
            </div>
            <div>
                <input type="password" placeholder="请输入密码">
            </div>
            <div>
                <input type="submit" value="登录">
            </div>
        </div>
        <a href="#" class="btns">忘记密码</a>
        <a href="#" class="btns register">注册</a>
    </div>
</body>
</html>

 CSS:

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    background: #eff0f4;
}

.box {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 230px auto;
    width: 470px;
}

.box .content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 350px;
    height: 350px;
    padding: 60px 20px;
    box-shadow: inset 20px 20px 20px rgba(0, 0, 0, .05),
        25px 35px 20px rgba(0, 0, 0, .05),
        25px 30px 30px rgba(0, 0, 0, .05),
        inset -20px -20px 25px rgba(255, 255, 255, .9);
}

.box .content {
    transition: .5s;
    border-radius: 52% 48% 33% 67% / 38% 45% 55% 62%;
}

.box .content:hover {
    border-radius: 50%;
}

.box .content::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 85px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.9;
}

.box .content::after {
    content: '';
    position: absolute;
    top: 90px;
    left: 110px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.9;
}

.box .content div {
    position: relative;
    width: 225px;
    border-radius: 25px;
    box-shadow:
        inset 2px 5px 10px rgba(0, 0, 0, .1),
        inset -2px -5px 10px rgba(255, 255, 255, .1),
        15px 15px 10px rgba(0, 0, 0, .05),
        15px 10px 15px rgba(0, 0, 0, .025);
}

.box .content input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    padding: 10px 15px;
}

.box .content input[type="submit"] {
    color: #fff;
    cursor: pointer;
}

.box .content div:last-child {
    width: 120px;
    background: #ff0f5b;
    transition: 0.5s;
    box-shadow: inset 2px 5px 10px rgba(0, 0, 0, .1),
        15px 15px 10px rgba(0, 0, 0, .05),
        15px 10px 15px rgba(0, 0, 0, .025);
}

.box .content div:last-child:hover {
    width: 150px;
}

.box .content div::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 65%;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

.btns {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 120px;
    height: 120px;
    background: #c61dff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
}

.btns {
    border-radius: 44% 56% 65% 35% / 57% 58% 42% 43%;
    box-shadow: inset 10px 10px 10px rgba(190, 1, 254, .05),
        15px 25px 10px rgba(190, 1, 254, .1),
        15px 20px 20px rgba(190, 1, 254, .1),
        inset -10px -10px 15px rgba(255, 255, 255, .5);
}

.register {
    bottom: 150px;
    right: 0px;
    width: 80px;
    height: 80px;
    background: #01b4ff;
    border-radius: 49% 51% 52% 48% / 63% 59% 41% 37%;
    box-shadow: inset 10px 10px 10px rgba(1, 180, 255, .05),
        15px 25px 10px rgba(1, 180, 255, .1),
        15px 20px 20px rgba(1, 180, 255, .1),
        inset -10px -10px 15px rgba(255, 255, 255, .5);
}

.btns::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 30px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.45;
}

.register::before {
    left: 20px;
    width: 15px;
    height: 15px;
}

.btns {
    transition: 0.25s;
}

.btns:hover {
    border-radius: 50%;
}

更多干货🎁

如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “👍点赞” “✍️评论” “💙收藏” 一键三连哦!
【👇🏻👇🏻👇🏻关注我| 获取更多源码 | 优质文章】 带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、期末大作业模板 、等! 
以上内容技术相关问题😈欢迎一起交流学习🔥嘉vx+18634371151

————————————————

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

耀南.

你的鼓励将是我最最最最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值