好看的登录界面源码,希望您喜欢

闲来无事,写几个好看的html界面玩一玩!

登录界面一:

代码

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

    .login-container {
      background-color: #fff;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      width: 300px; /* 固定宽度 */
      text-align: center;
      max-height: calc(300px * 1.618); /* 使用黄金比例计算最大高度 */
      overflow: hidden; /* 隐藏溢出的部分 */
    }

    .login-container h2 {
      color: #333;
    }

    .login-form {
      margin-top: 20px;
    }

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

    label {
      display: block;
      margin-bottom: 8px;
      color: #555;
    }

    input {
      width: 100%;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
    }

    button {
      background-color: #4caf50;
      color: #fff;
      padding: 10px 15px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }

    button:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>

  <div class="login-container">
    <h2> Welcome To My Page</h2>
    <form class="login-form">
      <div class="form-group">
        <label for="username">Username:</label>
        <input type="text" id="username" name="username" required>
      </div>

      <div class="form-group">
        <label for="password">Password:</label>
        <input type="password" id="password" name="password" required>
      </div>

      <button type="submit">Login</button>
    </form>
  </div>

</body>
</html>

效果

在这里插入图片描述

登录界面二:

代码

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Business Login</title>
  <style>
    body {
      margin: 0;
      font-family: 'Arial', sans-serif;
      background: url('https://huamaobizhi.com/appApi/wallpaper/getImages_1_0/?pid=21526&resolution=1000w680h') no-repeat center center fixed; /* 示例图片链接,请替换为你的图片路径 */
      background-size: cover;
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center; /* 将登录框放置在页面中央 */
    }

    .login-container {
      background-color: rgba(255, 255, 255, 0.5); /* 使用半透明的白色背景 */
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
      width: 300px;
      text-align: center;
	  margin-left: 50%;
    }

    .login-container h2 {
      color: #333;
    }

    .login-form {
      margin-top: 20px;
    }

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

    label {
      display: block;
      margin-bottom: 8px;
      color: #555;
    }

    input {
      width: 100%;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
    }

    button {
      background-color: #4caf50;
      color: #fff;
      padding: 10px 15px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }

    button:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>

  <div class="login-container">
    <h2>Welcome To My Page</h2>
    <form class="login-form">
      <div class="form-group">
        <label for="username">Username:</label>
        <input type="text" id="username" name="username" required>
      </div>

      <div class="form-group">
        <label for="password">Password:</label>
        <input type="password" id="password" name="password" required>
      </div>

      <button type="submit">Login</button>
    </form>
  </div>

</body>
</html>

效果

在这里插入图片描述

登录界面三:

代码

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Business Login</title>
  <style>
    body {
      margin: 0;
      font-family: 'Arial', sans-serif;
      background: url('https://huamaobizhi.com/appApi/wallpaper/getImages_1_0/?pid=21526&resolution=1000w680h') no-repeat center center fixed;
      background-size: cover;
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .login-container {
      background-color: rgba(255, 255, 255, 0.9);
      padding: 30px;
      border-radius: 10px;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
      width: 400px;
      text-align: center;
    }

    .login-container h2 {
      color: #333;
      margin-bottom: 20px;
    }

    .login-form {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

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

    label {
      display: block;
      margin-bottom: 8px;
      color: #555;
      text-align: left;
    }

    input {
      width: 100%;
      padding: 12px;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
    }

    button {
      background-color: #4caf50;
      color: #fff;
      padding: 12px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      width: 100%;
      font-size: 16px;
    }

    button:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>

  <div class="login-container">
    <h2>Welcome To My Page</h2>
    <form class="login-form">
      <div class="form-group">
        <label for="username">Username:</label>
        <input type="text" id="username" name="username" required>
      </div>

      <div class="form-group">
        <label for="password">Password:</label>
        <input type="password" id="password" name="password" required>
      </div>

      <button type="submit">Login</button>
    </form>
  </div>

</body>
</html>

效果

在这里插入图片描述

亲爱的朋友

在这个特别的日子,我想送上最诚挚的祝福。愿你在新的一年里,健康快乐,事业顺利,家庭幸福,梦想成真。愿你的每一天都充满阳光,每一步都是坚定向前,每一个梦想都能如期实现。愿你的笑容永远灿烂,心中永远充满希望。

无论遇到什么困难和挑战,我都会陪伴在你身边,支持你,鼓励你,和你一同面对,一同克服。愿你勇敢地迎接生活的每一个挑战,永远保持乐观和坚韧的心态。

愿你的人生如同一朵绽放的花朵,绽放出绚丽的色彩,散发出芬芳的香气,为这个世界增添美好。愿你的每一天都是美好的开始,每一天都是值得珍惜的时刻。

最后,衷心祝福你,新的一年里,万事如意,幸福安康。

  • 18
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
以下是一个简单的PyQt5登录界面源码示例: ```python import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QLineEdit, QPushButton class LoginWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("登录界面") self.setGeometry(500, 300, 300, 200) self.username_label = QLabel("用户名:", self) self.username_label.setGeometry(50, 30, 80, 30) self.password_label = QLabel("密码:", self) self.password_label.setGeometry(50, 70, 80, 30) self.username_input = QLineEdit(self) self.username_input.setGeometry(120, 30, 150, 30) self.password_input = QLineEdit(self) self.password_input.setGeometry(120, 70, 150, 30) self.password_input.setEchoMode(QLineEdit.Password) self.login_button = QPushButton("登录", self) self.login_button.setGeometry(50, 120, 220, 30) self.login_button.clicked.connect(self.login) def login(self): username = self.username_input.text() password = self.password_input.text() if username == "admin" and password == "123456": print("登录成功") else: print("用户名或密码不正确") if __name__ == '__main__': app = QApplication(sys.argv) window = LoginWindow() window.show() sys.exit(app.exec_()) ``` 这个源码实现了一个带有用户名和密码输入框以及登录按钮的登录界面。用户输入正确的用户名和密码后,点击登录按钮即可触发登录操作。如果用户名和密码正确,则输出"登录成功";否则输出"用户名或密码不正确"。界面简洁、美观且易于使用,适合作为登录界面使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

IT小辉同学

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

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

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

打赏作者

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

抵扣说明:

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

余额充值