💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
## 小米登录页面制作 >#### 最终呈现效果 ![](https://box.kancloud.cn/1503e1a89387ff2ffb00b7a138747b15_446x543.png) > #### html代码 ``` <div class="login"> <a href="#" class="choose left">账号登录</a> <span style="color: #e0e0e0">|</span> <a href="#" class="choose right">扫码登录</a> <form> <input type="text" placeholder="邮箱/手机号/小米账号" id="login-text"> <input type="password" placeholder="密码" id="login-pwd"> <input type="submit" value="登录" id="login-sub"> </form> <span class="forget"> <a href="#">注册小米账号</a> <span>|</span> <a href="#">忘记密码?</a></span> <fieldset> <legend>其他方式登录</legend> </fieldset> <div class="icon"> <a href="#" class="qq"></a> <a href="#" class="weibo"></a> <a href="#" class="pay"></a> <a href="#" class="wechat"></a> </div> </div> ``` >#### css代码 ``` /* ----------元素位置布局---------- */ * { margin: 0; padding: 0; } .login { width: 400px; height: 500px; box-shadow: 0 0 15px 3px rgba(51, 51, 51, 0.53); margin: 20px auto 0 auto; /* border: 1px solid aqua; */ text-align: center; } #login-text, #login-pwd { width: 350px; height: 30px; display: inline-block; margin-left: auto; margin-right: auto; } #login-sub { width: 364px; height: 30px; display: inline-block; margin-left: auto; margin-right: auto; } /* ----------样式设计---------- */ a { color: black; text-decoration: none; } .choose { display: inline-block; margin-top: 30px; font-size: 22px; } .left { color: #f56600; margin-right: 15px; } .right { margin-left: 15px; } #login-text, #login-pwd { padding: 8px 5px; font-size: 16px; /* box-sizing: border-box; */ outline: none;; } #login-text { margin-top: 35px; } #login-pwd { margin-top: 15px; } #login-sub { height: 50px; margin-top: 15px; border: none; outline: none; font-size: 20px; background-color: #f56600; color: white; } .forget { display: inline-block; margin-top: 15px; font-size: 13px; color: #e0e0e0; } .forget a { color: #999; } .forget a:hover { text-decoration: underline; } fieldset { display: inline-block; width: 364px; margin-top: 80px; color: #999; border: none; border-top: 1px solid #999 } /* ------------icon---------- */ .icon { margin: 30px auto; } .qq,.weibo,.pay,.wechat { width: 18px; height: 18px; display: inline-block; margin: 0 20px; border-radius: 50%; background: gray url("images/icons_type.png"); } .qq { background-position-x: -19px; } .weibo { background-position-x: -38px; } .pay { background-position-x: -59px; } .wechat { background-position-x: -87px; } .qq:hover, .weibo:hover, .pay:hover, .wechat:hover{ background-color: black; } ``` --------- 整个demo包括所含图片已上传至[github](https://github.com/MrXuxu/H5_demo/tree/master/%E5%B0%8F%E7%B1%B3%E7%99%BB%E5%BD%95%E6%A0%8F)