移动端登录界面代码html
时间: 2023-08-10 08:08:58 浏览: 316
以下是一个简单的移动端登录界面的 HTML 代码示例:
```html
<!DOCTYPE html>
<html>
<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: #f2f2f2;
}
form {
background-color: #fff;
border-radius: 5px;
padding: 20px;
margin: 50px auto;
max-width: 400px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
}
input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<form>
<h2>Login</h2>
<label for="username">Username:</label>
<input type="text" id="username" name="username" placeholder="Enter your username">
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter your password">
<input type="submit" value="Submit">
</form>
</body>
</html>
```
这个登录界面包括了一个简单的表单,用户可以输入用户名和密码,并点击提交按钮以向服务器发送登录信息。该界面使用了基本的 HTML、CSS 样式和一些简单的 JavaScript 小技巧来确保在移动设备上的良好显示。