hbuilder登录页面代码
时间: 2023-08-16 18:10:15 浏览: 28
以下是一个简单的 HBuilder 登录页面的代码示例:
HTML 代码:
```
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="login">
<h1>Login</h1>
<form>
<input type="text" name="username" placeholder="Username" required="required" />
<input type="password" name="password" placeholder="Password" required="required" />
<button type="submit" class="btn btn-primary btn-block btn-large">Let me in.</button>
</form>
</div>
</body>
</html>
```
CSS 代码:
```
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
.login {
background: #fff;
padding: 20px;
margin: 10% auto 0;
max-width: 400px;
box-shadow: 0px 2px 5px rgba(0,0,0,0.3);
}
h1 {
text-align: center;
font-size: 36px;
margin-bottom: 30px;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: none;
background-color: #f2f2f2;
}
button[type="submit"] {
width: 100%;
background-color: #4CAF50;
color: #fff;
padding: 10px;
border: none;
font-size: 16px;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #45a049;
}
```
注意:这只是一个简单的示例代码,您可以根据自己的需求进行修改。同时,此代码仅包括前端部分,需要与后端交互才能实现完整的登录功能。