酷代码 AI
菜单
服务商
DeepSeek字节豆包讯飞星火
更多选项

HTML+CSS实现带账号与密码输入框的手机登录页面

好的,以下是一个简单的带有账号和密码输入框的手机登录页面的示例代码(使用HTML和CSS): ```html <!DOCTYPE html> <html> <head> <title>手机登录</title> <style> body { background-color: #f2f2f2; font-family: Arial, sans-serif; margin: 0; padding: 0; } .container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; } .login-form { background-color: #fff; padding: 30px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } .form-group { margin-bottom: 20px; } .form-group label { display: block; font-weight: bold; margin-bottom: 5px; } .form-group input { width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #ccc; } .form-group input[type="submit"] { background-color: #4caf50; color: #fff; cursor: pointer; } .form-group input[type="submit"]:hover { background-color: #45a049; } </style> </head> <body> <div class="container"> <form class="login-form" action="login.php" method="post"> <div class="form-group"> <label for="username">账号:</label> <input type="text" id="username" name="username" required> </div> <div class="form-group"> <label for="password">密码:</label> <input type="password" id="password" name="password" required> </div> <div class="form-group"> <input type="submit" value="登录"> </div> </form> </div> </body> </html> ``` 这只是一个简单的示例,实际的表单可能需要更多的验证和安全措施来保护用户数据。你还需要创建一个处理登录请求的服务器端代码(例如`login.php`),以验证账号和密码的正确性,并执行相应的操作。 ######[AI写代码神器 | 1713点数解答 | 2024-01-23 10:19:36]

相关提问
本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]