代码 一个简洁大气的登录表单的HTML和CSS代码

2024-11-18 13:14:02 +0800 CST views 494

该文本展示了一个简洁大气的登录表单的HTML和CSS代码。表单包含用户注册所需的输入字段,如全名、电子邮件和密码,并使用现代的样式设计,确保良好的用户体验。表单还包括一个登录链接,方便已有账户的用户访问。

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简洁大气的登录表单</title>
    <style>
        body {
            padding: 200px;
            background-color: #000;
        }
        .form-box {
            max-width: 300px;
            background: #f1f7fe;
            overflow: hidden;
            border-radius: 16px;
            color: #010101;
        }
        .form {
            position: relative;
            display: flex;
            flex-direction: column;
            padding: 32px 24px 24px;
            gap: 16px;
            text-align: center;
        }
        .title {
            font-weight: bold;
            font-size: 1.6rem;
        }
        .subtitle {
            font-size: 1rem;
            color: #666;
        }
        .form-container {
            overflow: hidden;
            border-radius: 8px;
            background-color: #fff;
            margin: 1rem 0 .5rem;
            width: 100%;
        }
        .input {
            background: none;
            border: 0;
            outline: 0;
            height: 20px;
            width: 100%;
            border-bottom: 1px solid #eee;
            font-size: .9rem;
            padding: 8px 15px;
        }
        .form-section {
            padding: 16px;
            font-size: .85rem;
            background-color: #e0ecfb;
            box-shadow: rgb(0 0 0 / 8%) 0 -1px;
        }
        .form-section a {
            font-weight: bold;
            color: #0066ff;
            transition: color .3s ease;
        }
        .form-section a:hover {
            color: #005ce6;
            text-decoration: underline;
        }
        .form button {
            background-color: #0066ff;
            color: #fff;
            border: 0;
            border-radius: 24px;
            padding: 10px 16px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background-color .3s ease;
        }
        .form button:hover {
            background-color: #005ce6;
        }
    </style>
</head>
<body>
    <div class="form-box">
        <form class="form">
            <span class="title">Sign up</span>
            <span class="subtitle">Create a free account with your email.</span>
            <div class="form-container">
                <input type="text" class="input" placeholder="Full Name">
                <input type="email" class="input" placeholder="Email">
                <input type="password" class="input" placeholder="Password">
            </div>
            <button>Sign up</button>
        </form>
        <div class="form-section">
            <p>Have an account? <a href="">Log in</a></p>
        </div>
    </div>
</body>
</html>

images

复制全文 生成海报 前端开发 网页设计 用户体验

推荐文章

Linux 常用进程命令介绍
2024-11-19 05:06:44 +0800 CST
Nginx 防止IP伪造,绕过IP限制
2025-01-15 09:44:42 +0800 CST
Vue3中的自定义指令有哪些变化?
2024-11-18 07:48:06 +0800 CST
Elasticsearch 条件查询
2024-11-19 06:50:24 +0800 CST
如何使用go-redis库与Redis数据库
2024-11-17 04:52:02 +0800 CST
Golang实现的交互Shell
2024-11-19 04:05:20 +0800 CST
JavaScript设计模式:单例模式
2024-11-18 10:57:41 +0800 CST
对多个数组或多维数组进行排序
2024-11-17 05:10:28 +0800 CST
rangeSlider进度条滑块
2024-11-19 06:49:50 +0800 CST
Go语言SQL操作实战
2024-11-18 19:30:51 +0800 CST
Go配置镜像源代理
2024-11-19 09:10:35 +0800 CST
前端开发中常用的设计模式
2024-11-19 07:38:07 +0800 CST
PHP 允许跨域的终极解决办法
2024-11-19 08:12:52 +0800 CST
一些实用的前端开发工具网站
2024-11-18 14:30:55 +0800 CST
Vue3中如何实现插件?
2024-11-18 04:27:04 +0800 CST
go命令行
2024-11-18 18:17:47 +0800 CST
Git 常用命令详解
2024-11-18 16:57:24 +0800 CST
HTML和CSS创建的弹性菜单
2024-11-19 10:09:04 +0800 CST
程序员茄子在线接单