通过CSS简单修饰用户登录页面
    		       		warning:
    		            这篇文章距离上次修改已过453天,其中的内容可能已经有所变动。
    		        
        		                
                为了简化示例,我们将创建一个简单的登录表单的CSS样式。以下是一个基本的HTML和CSS代码示例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style>
  body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
  }
  .login-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    margin: 100px auto;
  }
  input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
  }
  input[type="submit"]:hover {
    background-color: #0056b3;
  }
  .forgot-password {
    text-align: right;
    font-size: 14px;
  }
</style>
</head>
<body>
 
<div class="login-container">
  <form action="/submit-your-login-form" method="post">
    <h2>Login</h2>
    <div>
      <input type="text" placeholder="Username" name="username" required>
    </div>
    <div>
      <input type="password" placeholder="Password" name="password" required>
    </div>
    <div class="forgot-password">
      <a href="/forgot-password">Forgot password?</a>
    </div>
    <div>
      <input type="submit" value="Login">
    </div>
  </form>
</div>
 
</body>
</html>这个简单的HTML和CSS样式将创建一个有基本布局、颜色、边框和阴影的登录表单。用户可以根据自己的需求进一步美化这个登录页面。
评论已关闭