今天来分享一个非常漂亮的注册登录页面

 

设计一个漂亮的注册登录页面需要综合考虑颜色、布局、字体和元素等方面的因素。以下是一个简单但漂亮的注册登录页面的示例代码,你可以根据需要进行修改和扩展。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>漂亮的注册登录页面</title>
<style>
  body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
  }

  .container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 400px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
  }

  input[type="text"],
  input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }

  button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
  }

  button:hover {
    background-color: #0056b3;
  }
</style>
</head>
<body>
<div class="container">
  <h2>欢迎!</h2>
  <p>请注册或登录以继续。</p>

  <form id="login-form" class="form-group">
    <label for="login-username">用户名</label>
    <input type="text" id="login-username" name="login-username" required>
    <label for="login-password">密码</label>
    <input type="password" id="login-password" name="login-password" required>
    <button type="submit">登录</button>
  </form>

  <hr>

  <form id="register-form" class="form-group">
    <label for="register-username">用户名</label>
    <input type="text" id="register-username" name="register-username" required>
    <label for="register-password">密码</label>
    <input type="password" id="register-password" name="register-password" required>
    <button type="submit">注册</button>
  </form>
</div>
</body>
</html>

在上述代码中,我们使用了简单的CSS来设置页面的样式,包括背景、边框、阴影和按钮。你可以根据自己的品味和需求进行样式调整。这个示例只是一个基础的起点,你可以通过添加更多的样式、动画和交互来进一步美化页面。

记得要确保你的页面在不同设备上都能够良好显示,所以可以使用@media查询来适应不同的屏幕尺寸。此外,还可以添加验证逻辑、用户反馈等功能来提升用户体验。

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

技术学堂

你的鼓励将是我创作的最大动力!

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

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

打赏作者

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

抵扣说明:

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

余额充值