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]
- HTML+jQuery 实现列表元素悬停动画效果:代码详解与注意事项(字节豆包 | 475点数解答 | 2024-12-19 14:58:05)383
- HTML+jQuery:打造动态导航栏动画效果及注意事项(字节豆包 | 495点数解答 | 2024-12-19 14:58:06)329
- HTML+jQuery:打造带动态交互效果的商品展示页面(讯飞星火 | 497点数解答 | 2024-12-19 14:58:18)333
- HTML与jQuery结合:实现商品列表交互动画的首页代码解析(讯飞星火 | 497点数解答 | 2024-12-19 14:58:20)354
- 探秘这段 HTML 代码背后的网页奥秘(字节豆包 | 51点数解答 | 2024-12-09 20:31:23)362
- 帝王尬笑博客:技术、项目与生活点滴的精彩汇聚(GPT | 86点数解答 | 2024-11-16 02:59:47)298
- 锁屏页面代码优化:从内联样式到外部 CSS 的完美转变(字节豆包 | 2052点数解答 | 2025-05-31 12:45:02)226
- 锁屏页面代码优化:模块化、注释与兼容性全攻略(字节豆包 | 2110点数解答 | 2025-05-31 12:45:28)253
- 微信钱包前端演示代码:从问题修正到完善功能及安全提示(字节豆包 | 2097点数解答 | 2025-07-11 18:06:46)159
- 充值页面LayUI框架代码分析:问题、优化与逻辑要点(DeepSeek | 354点数解答 | 2025-05-05 02:54:04)200
- 奥特曼特摄站代码:从问题重重到完美优化全揭秘(字节豆包 | 1523点数解答 | 2025-06-04 13:19:47)627
- 代码揭秘:话费订单管理页面的基础搭建(字节豆包 | 31点数解答 | 2024-10-28 18:03:44)268