当前位置: 首页 > news >正文

HTML+CSS 水滴登录页

文章目录

  • 一、效果演示
  • 二、Code
    • 1.HTML
    • 2.CSS
  • 三、实现思路拆分


一、效果演示

在这里插入图片描述

实现了一个水滴登录页的效果。页面包含一个水滴形状的登录框和两个按钮,登录框包括用户名、密码和登录按钮,按钮分别为忘记密码和注册。整个页面的设计非常有创意,采用了水滴形状和渐变色的设计,使得页面看起来非常美观和舒适。同时,登录框和按钮的动态效果也增强了页面的交互性和视觉效果。

二、Code

1.HTML

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>水滴登录页</title><link rel="stylesheet" href="./68-水滴登录页.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>

2.CSS

* {margin: 0;padding: 0;box-sizing: border-box;
}body {height: 100vh;background: #eff0f4;overflow: hidden;
}.box {position: relative;display: flex;justify-content: space-between;margin: 150px 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, 0.05),25px 35px 20px rgba(0, 0, 0, 0.05), 25px 30px 30px rgba(0, 0, 0, 0.05),inset -20px -20px 25px rgba(255, 255, 255, 0.9);
}.box .content {border-radius: 52% 48% 33% 67% / 38% 45% 55% 62%;transition: 0.5s;
}.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, 0.1),inset -2px -5px 10px rgba(255, 255, 255, 1),15px 15px 10px rgba(0, 0, 0, 0.05), 15px 10px 15px rgba(0, 0, 0, 0.025);
}.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;
}.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;box-shadow: inset 2px 5px 10px rgba(0, 0, 0, 0.1),15px 15px 10px rgba(0, 0, 0, 0.05), 15px 10px 15px rgba(0, 0, 0, 0.025);transition: 0.5s;
}.box .content div:last-child:hover {width: 150px;
}.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;box-shadow: inset 10px 10px 10px rgba(190, 1, 254, 0.05),15px 25px 10px rgba(190, 1, 254, 0.1), 15px 20px 20px rgba(190, 1, 254, 0.1),inset -10px -10px 15px rgba(255, 255, 255, 0.5);border-radius: 44% 56% 65% 35% / 57% 58% 42% 43%;
}.register {bottom: 150px;right: 0px;width: 80px;height: 80px;border-radius: 49% 51% 52% 48% / 63% 59% 41% 37%;background: #01b4ff;box-shadow: inset 10px 10px 10px rgba(1, 180, 255, 0.05),15px 25px 10px rgba(1, 180, 255, 0.1), 15px 20px 20px rgba(1, 180, 255, 0.1),inset -10px -10px 15px rgba(255, 255, 255, 0.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%;
}

三、实现思路拆分

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

重置所有元素的默认样式。

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

设置页面的背景颜色和尺寸。

.box {position: relative;display: flex;justify-content: space-between;margin: 150px 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, 0.05),25px 35px 20px rgba(0, 0, 0, 0.05), 25px 30px 30px rgba(0, 0, 0, 0.05),inset -20px -20px 25px rgba(255, 255, 255, 0.9);
}

设置登录表单内容的样式,包括3D效果和过渡动画。

.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, 0.1),inset -2px -5px 10px rgba(255, 255, 255, 1),15px 15px 10px rgba(0, 0, 0, 0.05), 15px 10px 15px rgba(0, 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;
}

为提交按钮设置特定的样式。

.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;box-shadow: inset 10px 10px 10px rgba(190, 1, 254, 0.05),15px 25px 10px rgba(190, 1, 254, 0.1), 15px 20px 20px rgba(190, 1, 254, 0.1),inset -10px -10px 15px rgba(255, 255, 255, 0.5);border-radius: 44% 56% 65% 35% / 57% 58% 42% 43%;
}

设置忘记密码和注册按钮的样式,包括3D效果、阴影和过渡动画。

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

为按钮添加悬停效果和装饰性伪元素。

相关文章:

HTML+CSS 水滴登录页

文章目录 一、效果演示二、Code1.HTML2.CSS 三、实现思路拆分 一、效果演示 实现了一个水滴登录页的效果。页面包含一个水滴形状的登录框和两个按钮&#xff0c;登录框包括用户名、密码和登录按钮&#xff0c;按钮分别为忘记密码和注册。整个页面的设计非常有创意&#xff0c;采…...

基于Next.js和TailwindCss的TailwindCss

最近在研究 Next.js 和 TailwindCss &#xff0c;这两天没事的时候就搞了一个 c。 目前工具部署在 Vercel &#xff0c;欢迎各位体验&#xff08;能提出意见更好嘿嘿&#xff09; 体验地址&#xff1a; https://icon.999872.xyz/ 图片预览 &#x1f447;...

若依开源系统多数据源整合clickhouse数据库详细步骤

1.添加依赖【pom.xml文件】 <!-- clickhouse数据源依赖--><dependency><groupId>ru.yandex.clickhouse</groupId>...

Subdominator:一款针对漏洞奖励计划的子域名安全枚举工具

关于Subdominator Subdominator是一款针对漏洞奖励计划的子域名安全枚举工具&#xff0c;可用于在漏洞搜寻和侦察过程中进行被动子域名枚举。它旨在通过高效枚举子域名和各种免费被动资源来帮助研究人员和网络安全专业人员发现潜在的安全漏洞。 Subdominator 与各种免费和付费…...

[leetcode]516_最长回文子序列

给你一个字符串 s &#xff0c;找出其中最长的回文子序列&#xff0c;并返回该序列的长度。 子序列定义为&#xff1a;不改变剩余字符顺序的情况下&#xff0c;删除某些字符或者不删除任何字符形成的一个序列。示例 1&#xff1a; 输入&#xff1a;s "bbbab" 输出&a…...

电子相册|智能化电子相册|基于java的电子相册管理系统设计与实现(源码+数据库+文档)

电子相册管理系统 目录 基于java的电子相册管理系统设计与实现 一、前言 二、系统功能设计 三、系统实现 四、数据库设计 1、实体ER图 五、核心代码 六、论文参考 七、最新计算机毕设选题推荐 八、源码获取&#xff1a; 博主介绍&#xff1a;✌️大厂码农|毕设布道师&…...

linux项目_c语言:Makefile编写、动态库生成、添加动态库路径

一直想搞懂Linux中Makefile是怎么管理项目的&#xff0c;知识积累到一定程度后&#xff0c;我就做了一个自己的缩小项目去把剩下的细节搞清楚 代码&#xff1a; Service.c: #include <stdio.h> #include "lib_sevr.h" int main(){printf("输入a, b的值…...

Python学习(1):字典、DataFrame的创建方法

1. 字典的创建方法 1.1 直接创建 # 创建一个包含姓名和年龄的字典 person {"name": "Alice", "age": 25}print(person) # 输出&#xff1a;{name: Alice, age: 25} 1.2 使用 dict() 函数 # 使用键值对列表创建字典 person dict(name"…...

async await 介绍 从0手动实现async await

1 async await介绍 async 和 await 是用于处理异步编程的语法糖&#xff0c;它们简化了异步操作的编写&#xff0c;使其看起来像同步代码。通过 async 标记一个函数为异步函数&#xff0c;返回的是一个 Promise 对象&#xff0c;而 await 用来暂停执行&#xff0c;直到 Promise…...

UDP校验和计算及网络中的校验和机制

UDP (User Datagram Protocol) 是一种无连接的传输层协议&#xff0c;它不像 TCP 那样提供可靠的传输保证。虽然 UDP 不保证数据可靠性&#xff0c;但它仍然提供了一个可选的校验和机制来检测数据在传输过程中出现的错误。 理解UDP校验和的计算过程和其在网络中的作用至关重要。…...

如何使用C语言接入Doris数据库

如何使用C语言接入Doris数据库 一、环境准备1. 安装MySQL C API2. Doris数据库环境二、编写C语言接入代码1. 包含必要的头文件2. 编写连接和查询函数3. 编译和运行程序三、注意事项1. 安全性2. 错误处理3. 性能优化4. 兼容性5. 调试和日志记录四、结论Doris(之前称为Palo或Apa…...

DarkLabel 2.4 目标追标注工具介绍

DarkLabel介绍 https://github.com/darkpgmr/DarkLabel 官方地址 视频/图像标注工具&#xff0c;很适合用于目标追踪任务 DarkLabel可以在视频和图像中标注物体的边界框&#xff0c;并附上 ID 和name。还可以用于裁剪视频、从视频中采样训练图像以及对图像区域进行马赛克处理…...

uniapp设置从右上角到左下角的三种渐变颜色

推荐学习文档 golang应用级os框架&#xff0c;欢迎stargolang应用级os框架使用案例&#xff0c;欢迎star案例&#xff1a;基于golang开发的一款超有个性的旅游计划app经历golang实战大纲golang优秀开发常用开源库汇总想学习更多golang知识&#xff0c;这里有免费的golang学习笔…...

Python 解析 html

一、场景分析 假设有如下 html 文档&#xff1a; 写一段 python 脚本&#xff0c;解析出里面的数据&#xff0c;包括经度维度。 <div classstorelist><ul><li lng"100.111111" lat"10.111111"><h4>联盟店1</h4><p>…...

“大数据+高职”:VR虚拟仿真实训室的发展前景

随着信息技术的迅猛发展&#xff0c;大数据技术与虚拟现实&#xff08;VR&#xff09;的融合正在为高等教育&#xff0c;尤其是高等职业教育&#xff08;高职&#xff09;带来革命性的变革。VR虚拟仿真实训室作为这一技术融合的典型应用&#xff0c;正逐步展现其在提升教育质量…...

Pygame中Sprite实现逃亡游戏4

在《Pygame中Sprite实现逃亡游戏3》中实现了玩家跳跃飞火的效果&#xff0c;接下来通过精灵类的碰撞检测来判断飞火是否击中玩家、飞火是否击中飞龙以及飞龙是否抓住玩家。 1 飞火是否击中玩家的判断 判断飞火是否击中玩家的代码如图1所示。 图1 判断飞火是否击中玩家的代码 …...

sentinel原理源码分析系列(一)-总述

背景 微服务是目前java主流开发架构&#xff0c;微服务架构技术栈有&#xff0c;服务注册中心&#xff0c;网关&#xff0c;熔断限流&#xff0c;服务同学&#xff0c;配置中心等组件&#xff0c;其中&#xff0c;熔断限流主要3个功能特性&#xff0c;限流&#xff0c;熔断&…...

创建数据/采集数据+从PI数据到PC+实时UI+To PLC

Get_Data ---------- import csv import os import random from datetime import datetime import logging import time # 配置日志记录 logging.basicConfig(filename=D:/_Study/Case/Great_Data/log.txt, level=logging.INFO, format=%(asctime)s - %(l…...

Linux基础入门 --12 DAY(SHELL脚本编程基础)

shell脚本编程 声明&#xff1a;首行shebang机制 #!/bin/bash #!/usr/bin/python #!/usr/bin/perl 变量 变量类型 变量类型&#xff1a; 内置变量 : 如 PS1 , PATH ,HISTSIZE 用户自定义变量 不同变量存放数据不同&#xff0c;决定了以下 1.数据存储方式 2.参与的运算 3.表示…...

关于frp Web界面-----frp Server Dashboard 和 frp Client Admin UI

Web 界面 官方文档&#xff1a;https://gofrp.org/zh-cn/docs/features/common/ui/ 目前 frpc 和 frps 分别内置了相应的 Web 界面方便用户使用。 客户端 Admin UI 服务端 Dashboard 服务端 Dashboard 服务端 Dashboard 使用户可以通过浏览器查看 frp 的状态以及代理统计信…...

测试微信模版消息推送

进入“开发接口管理”--“公众平台测试账号”&#xff0c;无需申请公众账号、可在测试账号中体验并测试微信公众平台所有高级接口。 获取access_token: 自定义模版消息&#xff1a; 关注测试号&#xff1a;扫二维码关注测试号。 发送模版消息&#xff1a; import requests da…...

Linux简单的操作

ls ls 查看当前目录 ll 查看详细内容 ls -a 查看所有的内容 ls --help 查看方法文档 pwd pwd 查看当前路径 cd cd 转路径 cd .. 转上一级路径 cd 名 转换路径 …...

BCS 2025|百度副总裁陈洋:智能体在安全领域的应用实践

6月5日&#xff0c;2025全球数字经济大会数字安全主论坛暨北京网络安全大会在国家会议中心隆重开幕。百度副总裁陈洋受邀出席&#xff0c;并作《智能体在安全领域的应用实践》主题演讲&#xff0c;分享了在智能体在安全领域的突破性实践。他指出&#xff0c;百度通过将安全能力…...

MySQL 8.0 OCP 英文题库解析(十三)

Oracle 为庆祝 MySQL 30 周年&#xff0c;截止到 2025.07.31 之前。所有人均可以免费考取原价245美元的MySQL OCP 认证。 从今天开始&#xff0c;将英文题库免费公布出来&#xff0c;并进行解析&#xff0c;帮助大家在一个月之内轻松通过OCP认证。 本期公布试题111~120 试题1…...

使用 Streamlit 构建支持主流大模型与 Ollama 的轻量级统一平台

🎯 使用 Streamlit 构建支持主流大模型与 Ollama 的轻量级统一平台 📌 项目背景 随着大语言模型(LLM)的广泛应用,开发者常面临多个挑战: 各大模型(OpenAI、Claude、Gemini、Ollama)接口风格不统一;缺乏一个统一平台进行模型调用与测试;本地模型 Ollama 的集成与前…...

算法岗面试经验分享-大模型篇

文章目录 A 基础语言模型A.1 TransformerA.2 Bert B 大语言模型结构B.1 GPTB.2 LLamaB.3 ChatGLMB.4 Qwen C 大语言模型微调C.1 Fine-tuningC.2 Adapter-tuningC.3 Prefix-tuningC.4 P-tuningC.5 LoRA A 基础语言模型 A.1 Transformer &#xff08;1&#xff09;资源 论文&a…...

QT3D学习笔记——圆台、圆锥

类名作用Qt3DWindow3D渲染窗口容器QEntity场景中的实体&#xff08;对象或容器&#xff09;QCamera控制观察视角QPointLight点光源QConeMesh圆锥几何网格QTransform控制实体的位置/旋转/缩放QPhongMaterialPhong光照材质&#xff08;定义颜色、反光等&#xff09;QFirstPersonC…...

Caliper 配置文件解析:fisco-bcos.json

config.yaml 文件 config.yaml 是 Caliper 的主配置文件,通常包含以下内容: test:name: fisco-bcos-test # 测试名称description: Performance test of FISCO-BCOS # 测试描述workers:type: local # 工作进程类型number: 5 # 工作进程数量monitor:type: - docker- pro…...

LCTF液晶可调谐滤波器在多光谱相机捕捉无人机目标检测中的作用

中达瑞和自2005年成立以来&#xff0c;一直在光谱成像领域深度钻研和发展&#xff0c;始终致力于研发高性能、高可靠性的光谱成像相机&#xff0c;为科研院校提供更优的产品和服务。在《低空背景下无人机目标的光谱特征研究及目标检测应用》这篇论文中提到中达瑞和 LCTF 作为多…...

Ubuntu系统多网卡多相机IP设置方法

目录 1、硬件情况 2、如何设置网卡和相机IP 2.1 万兆网卡连接交换机&#xff0c;交换机再连相机 2.1.1 网卡设置 2.1.2 相机设置 2.3 万兆网卡直连相机 1、硬件情况 2个网卡n个相机 电脑系统信息&#xff0c;系统版本&#xff1a;Ubuntu22.04.5 LTS&#xff1b;内核版本…...