hbuilder简单登录界面代码
时间: 2023-08-11 13:08:44 浏览: 74
以下是一个简单的 HBuilder 登录界面代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>登录界面</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #f2f2f2;
}
.container {
background-color: #ffffff;
border-radius: 5px;
padding: 20px;
margin: 100px auto;
max-width: 400px;
box-shadow: 0px 0px 10px #888888;
}
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: 14px 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>登录界面</h2>
<form>
<label for="username">用户名</label>
<input type="text" id="username" name="username" placeholder="请输入用户名" required>
<label for="password">密码</label>
<input type="password" id="password" name="password" placeholder="请输入密码" required>
<button type="submit">登录</button>
</form>
</div>
</body>
</html>
```
这是一个简单的登录界面,包含用户名和密码输入框以及登录按钮。你可以将这个代码复制到 HBuilder 中,然后执行预览来查看效果。