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

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

登录界面一:

代码

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>

效果

登录界面二:

代码

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>

效果

登录界面三:

代码

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>

效果

亲爱的朋友
在这个特别的日子,我想送上最诚挚的祝福。愿你在新的一年里,健康快乐,事业顺利,家庭幸福,梦想成真。愿你的每一天都充满阳光,每一步都是坚定向前,每一个梦想都能如期实现。愿你的笑容永远灿烂,心中永远充满希望。
无论遇到什么困难和挑战,我都会陪伴在你身边,支持你,鼓励你,和你一同面对,一同克服。愿你勇敢地迎接生活的每一个挑战,永远保持乐观和坚韧的心态。
愿你的人生如同一朵绽放的花朵,绽放出绚丽的色彩,散发出芬芳的香气,为这个世界增添美好。愿你的每一天都是美好的开始,每一天都是值得珍惜的时刻。
最后,衷心祝福你,新的一年里,万事如意,幸福安康。

相关推荐
安冬的码畜日常7 分钟前
【D3.js in Action 3 精译_029】3.5 给 D3 条形图加注图表标签(上)
开发语言·前端·javascript·信息可视化·数据可视化·d3.js
太阳花ˉ14 分钟前
html+css+js实现step进度条效果
javascript·css·html
john_hjy1 小时前
11. 异步编程
运维·服务器·javascript
风清扬_jd1 小时前
Chromium 中JavaScript Fetch API接口c++代码实现(二)
javascript·c++·chrome
姜学迁2 小时前
Rust-枚举
开发语言·后端·rust
yanlele2 小时前
前瞻 - 盘点 ES2025 已经定稿的语法规范
前端·javascript·代码规范
It'sMyGo2 小时前
Javascript数组研究09_Array.prototype[Symbol.unscopables]
开发语言·javascript·原型模式
爱学习的小健2 小时前
MQTT--Java整合EMQX
后端
懒羊羊大王呀2 小时前
CSS——属性值计算
前端·css