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

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

该文本展示了一个简洁大气的登录表单的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

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

推荐文章

Nginx 性能优化有这篇就够了!
2024-11-19 01:57:41 +0800 CST
404错误页面的HTML代码
2024-11-19 06:55:51 +0800 CST
mysql时间对比
2024-11-18 14:35:19 +0800 CST
pin.gl是基于WebRTC的屏幕共享工具
2024-11-19 06:38:05 +0800 CST
GROMACS:一个美轮美奂的C++库
2024-11-18 19:43:29 +0800 CST
MySQL 主从同步一致性详解
2024-11-19 02:49:19 +0800 CST
PHP来做一个短网址(短链接)服务
2024-11-17 22:18:37 +0800 CST
Golang在整洁架构中优雅使用事务
2024-11-18 19:26:04 +0800 CST
Vue3中如何使用计算属性?
2024-11-18 10:18:12 +0800 CST
H5端向App端通信(Uniapp 必会)
2025-02-20 10:32:26 +0800 CST
Hypothesis是一个强大的Python测试库
2024-11-19 04:31:30 +0800 CST
JavaScript数组 splice
2024-11-18 20:46:19 +0800 CST
在 Rust 生产项目中存储数据
2024-11-19 02:35:11 +0800 CST
Elasticsearch 文档操作
2024-11-18 12:36:01 +0800 CST
Vue3中的虚拟滚动有哪些改进?
2024-11-18 23:58:18 +0800 CST
10个几乎无人使用的罕见HTML标签
2024-11-18 21:44:46 +0800 CST
Go的父子类的简单使用
2024-11-18 14:56:32 +0800 CST
为什么要放弃UUID作为MySQL主键?
2024-11-18 23:33:07 +0800 CST
程序员茄子在线接单