写一个html登陆页面
时间: 2023-08-25 22:14:57 浏览: 20
### 回答1:
<html>
<head>
<title>Login Page</title>
</head>
<body>
<form action="login.php" method="post">
Username: <input type="text" name="username" /><br />
Password: <input type="password" name="password" /><br />
<input type="submit" value="Login" />
</form>
</body>
</html>
### 回答2:
<html>
<head>
<title>登陆页面</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
.container{
width: 200px;
margin: 0 auto;
padding-top: 100px;
}
.login-box {
border: 1px solid #ccc;
background-color: #fff;
padding: 20px;
}
h2 {
text-align: center;
}
input[type=text], input[type=password]{
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
}
button:hover {
opacity: 0.8;
}
</style>
</head>
<body>
<div class="container">
<div class="login-box">
<h2>登陆</h2>
<form>
<input type="text" placeholder="请输入用户名" required>
<input type="password" placeholder="请输入密码" required>
<button type="submit">登陆</button>
</form>
</div>
</div>
</body>
</html>
### 回答3:
<html>
<head>
<title>登录页面</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.login-form {
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
text-align: center;
}
.login-form input[type="text"],
.login-form input[type="password"] {
width: 250px;
height: 30px;
margin-bottom: 10px;
border: 1px solid #ccc;
padding: 5px;
}
.login-form input[type="submit"] {
background-color: #4CAF50;
color: white;
border: none;
width: 150px;
height: 40px;
cursor: pointer;
}
.login-form input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="container">
<form class="login-form" action="login.php" method="post">
<h2>用户登录</h2>
<input type="text" name="username" placeholder="用户名" required><br>
<input type="password" name="password" placeholder="密码" required><br>
<input type="submit" value="登录">
</form>
</div>
</body>
</html>