hbuilder简单登录界面代码
时间: 2023-09-03 12:12:17 浏览: 36
以下是使用HTML和CSS实现的简单登录界面代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
.container {
width: 500px;
background-color: #fff;
margin: 100px auto;
padding: 40px;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
h2 {
text-align: center;
margin-bottom: 30px;
}
input[type=text], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="container">
<h2>Login Form</h2>
<form>
<label for="username">Username</label>
<input type="text" id="username" name="username" placeholder="Enter username">
<label for="password">Password</label>
<input type="password" id="password" name="password" placeholder="Enter password">
<button type="submit">Login</button>
</form>
</div>
</body>
</html>
```
这段代码实现了一个简单的登录界面,包括用户名和密码输入框,以及登录按钮。您可以将其保存为一个HTML文件,然后使用HBuilder打开并运行。