Loading... # 简述 体验地址:[ETrip](http://etrip.iczrx.cn/login.html) ![登陆页面](https://bucket.iczrx.cn/2024/04/15/661d41dddc559.jpg) ![输入框](https://bucket.iczrx.cn/2024/04/15/661d420308b5e.jpg) ![点击按钮显示的弹窗](https://bucket.iczrx.cn/2024/04/15/661d422acc12e.jpg) 这个页面运用了MDUI 2 昨天晚上临时做的 大概花了1个小时 可能会有点瑕疵,源码仅供参考 只包含了前端页面,后端页面还没有做 大家可以根据MDUI 2的文档来自己修改 这个项目也是会一直更新的,期待你的关注~ # 源码 ## login.html ```html <html lang="zh-CN"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>苏e行-登陆</title> <link rel="stylesheet" href="//etrip.iczrx.cn/assets/mdui.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <script src="//etrip.iczrx.cn/assets/mdui.global.js"></script> <script src="//etrip.iczrx.cn/assets/jquery-3.7.1.min.js"></script> <script src="//etrip.iczrx.cn/assets/3.1.1/layer.js"></script> <style> html { background: url('//bucket.iczrx.cn/2024/04/14/661abc07dce8b.png') no-repeat center center fixed; background-size: cover; } .card { width: 320px; height: 380px; margin: 0 auto; margin-top: 70px; background-color: #F8FBFE; border-radius: 8px; z-index: 1; opacity: 85%; } .tools { display: flex; align-items: center; padding: 9px; } .circle { padding: 0 4px; } .box { display: inline-block; align-items: center; width: 10px; height: 10px; padding: 1px; border-radius: 50%; } .red { background-color: #ff605c; } .yellow { background-color: #ffbd44; } .green { background-color: #00ca4e; } .input { display: flex; width: 220px; flex-direction: column; justify-content: center; align-items: center; margin: 0 auto; } hr { margin: 0 auto; width: 280px; opacity: 40%; } </style> </head> <body> <div class="card"> <div class="tools"> <div class="circle"> <span class="red box"></span> </div> <div class="circle"> <span class="yellow box"></span> </div> <div class="circle"> <span class="green box"></span> </div> </div> <div class="card__content"> <p style="font-size:20px;text-align:center;">苏e行-用户登陆</p> <hr> <form style="padding-top:20px"> <mdui-text-field type="password" toggle-password clearable variant="outlined" class="input" label="请输入身份证" placeholder="填写您预留的证件号码"><mdui-button-icon slot="icon" icon="person"></mdui-button-icon></mdui-text-field> <br> <mdui-text-field type="password" toggle-password clearable variant="outlined" class="input" label="请输入密码" placeholder="填写您设置的密码"><mdui-button-icon slot="icon" icon="password"></mdui-button-icon></mdui-text-field> <br> <mdui-dialog close-on-overlay-click class="example-overlay">登陆正在开发中哦~</mdui-dialog> <mdui-button variant="elevated" class="input">登陆</mdui-button> </form> </div> </div> <script> const dialog = document.querySelector(".example-overlay"); const openButton = dialog.nextElementSibling; openButton.addEventListener("click", () => dialog.open = true); </script> </body> </html> ``` 最后修改:2024 年 08 月 26 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 3 如果觉得我的文章对你有用,请随意赞赏