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

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

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

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

推荐文章

随机分数html
2025-01-25 10:56:34 +0800 CST
mysql 计算附近的人
2024-11-18 13:51:11 +0800 CST
liunx宝塔php7.3安装mongodb扩展
2024-11-17 11:56:14 +0800 CST
在Vue3中实现代码分割和懒加载
2024-11-17 06:18:00 +0800 CST
Vue3中如何处理WebSocket通信?
2024-11-19 09:50:58 +0800 CST
Vue3如何执行响应式数据绑定?
2024-11-18 12:31:22 +0800 CST
介绍25个常用的正则表达式
2024-11-18 12:43:00 +0800 CST
pin.gl是基于WebRTC的屏幕共享工具
2024-11-19 06:38:05 +0800 CST
Go 接口:从入门到精通
2024-11-18 07:10:00 +0800 CST
PHP 的生成器,用过的都说好!
2024-11-18 04:43:02 +0800 CST
用 Rust 构建一个 WebSocket 服务器
2024-11-19 10:08:22 +0800 CST
Nginx 状态监控与日志分析
2024-11-19 09:36:18 +0800 CST
html一份退出酒场的告知书
2024-11-18 18:14:45 +0800 CST
Go 协程上下文切换的代价
2024-11-19 09:32:28 +0800 CST
Vue 3 中的 Fragments 是什么?
2024-11-17 17:05:46 +0800 CST
CSS Grid 和 Flexbox 的主要区别
2024-11-18 23:09:50 +0800 CST
PHP openssl 生成公私钥匙
2024-11-17 05:00:37 +0800 CST
程序员茄子在线接单