用html写一个小米登录页面

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小米账号-登录</title>

    <style>
          .logo{
            position: absolute;
          }
          .milogo{
            position: absolute;
            left: 390px;
            top: 24px; 
          }
          .zhanghao{
            position: absolute;
            left: 440px;
            top: 2px;
            font-size: 25px;
            color: #333333;
            font-weight: 550;
          }
          .others{
            position: absolute;
            left: 1150px;
            top: 24px;
            font-size: 14px;
            color: #8391b3;
          }
          .area{
            position: relative;
            width: 480px;
            height: 540px;
            left: 670px;
            top: 90px;
            background-color: #ffffff;
            box-shadow: 10px 10px 90px  #f8f8f8, -10px -10px 90px  #f8f8f8;
          }
          .input {
            width: 350px;
            height: 50px;
        }


          
    </style>
</head>
<body>
    <div class="logo">
        <img src="./image/左侧log.jpg"width=365px>
    </div>
    <div class="milogo">
        <img src="./image/milogo.jpg"width=42px height="42px">
    </div>
    <div class="zhanghao">
        <div style="float: none";>
            <p>
                小米账号
            </p>
        </div>
        
    </div>
    <div class="others">
        <p>用户协议&nbsp;&nbsp;&nbsp;&nbsp;隐私政策&nbsp;&nbsp;&nbsp;&nbsp;帮助中心</p>
    </div>
    <form>
    <div class="area">
        <div style="position: absolute;left:65px;top:70px">
            <!-- 标语 -->
            <div>
                <p><b style="color: black;font-size: 20px;">登录</b></p>
            </div>
            <!-- 表单框 -->
                <!-- 用户名框 -->
                <div>
                    <input type="text" class="input"style="font-size:17px;"placeholder="邮箱/手机号码/小米ID">
                </div>
                <!-- 密码框 -->
                <div style="position: relative;top: 15px;">
                    <input type="password" class="input"style="font-size:16px;"placeholder="密码">
                </div>
                <div style="position: absolute;left: 0px;top: 192px;">
                    <input type="checkbox">已阅读并同意小米账号用户协议和隐私政策
                </div>
                <div style="position: absolute;left: 0px;top: 220px;">
                    <input type="submit" value="登录" style="border:none ; font-size: 20px;color: #ffffff;background-color: #ffcba9;width: 360px;height: 50px;">                    
                </div>
                <div style="position:absolute;top: 270px;">
                    <a href="www.baidu.com"style="color: #ff8a45;text-decoration:none;">忘记密码?</a>
                </div>
                <div style="position:absolute;top: 270px;left: 275px;">
                    <a href="www.baidu.com"style="color: #ff8a45;text-decoration:none">手机号登录</a>
                </div>
                <div style="position:absolute;top: 300px;left: 128px;">
                    <p style="color: #aab2c8;">
                        其他方式登录
                    </p>
                </div>
            </div>
        </div>
     </div>
    </form>
</body>
</html>

好的,下面是一个简单的小米页面HTMLCSS代码: HTML代码: ``` <!DOCTYPE html> <html> <head> <title>小米官网</title> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <header> <nav> <ul> <li><a href="#">首页</a></li> <li><a href="#">小米手机</a></li> <li><a href="#">电视</a></li> <li><a href="#">笔记本</a></li> <li><a href="#">家电</a></li> <li><a href="#">智能硬件</a></li> </ul> </nav> </header> <section id="banner"> <h1>小米10 Pro</h1> <p>全球首款LPDDR5内存</p> <a href="#" class="button">了解更多</a> </section> <section id="products"> <h2>小米产品</h2> <div class="product"> <img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/bd9c9f9d2acfe3d3ce9d4eb9b4e0e060.jpg?thumb=1&w=400&h=400"> <h3>小米电视</h3> <p>从 32 至 75 英寸,满足各种需求</p> <a href="#">了解更多</a> </div> <div class="product"> <img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/3e9f5b09e7cbdc500c1d4bfa5ac1a0f5.jpg?thumb=1&w=400&h=400"> <h3>小米电脑</h3> <p>轻薄便携,助力高效办公和生活</p> <a href="#">了解更多</a> </div> <div class="product"> <img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/3ac9d9c9e6f8f4d71d6d2fd4a464150a.jpg?thumb=1&w=400&h=400"> <h3>小米手机</h3> <p>强大性能搭载最新技术</p> <a href="#">了解更多</a> </div> <div class="product"> <img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/1b779f3c9a2b84fb1de4709b2f9d57a8.jpg?thumb=1&w=400&h=400"> <h3>小米家电</h3> <p>智能可控,让生活更美好</p> <a href="#">了解更多</a> </div> </section> <footer> <p>© 2021 小米</p> </footer> </body> </html> ``` CSS代码: ``` /* Reset CSS */ * { margin: 0; padding: 0; box-sizing: border-box; } /* Global Styles */ body { font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; color: #333; } a { text-decoration: none; color: #333; } ul { list-style: none; } /* Header Styles */ header { background-color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); position: fixed; top: 0; left: 0; width: 100%; z-index: 1; } nav { max-width: 1200px; margin: 0 auto; padding: 20px 0; } nav ul { display: flex; justify-content: space-between; align-items: center; } nav li { margin-right: 20px; } nav a { padding: 5px 10px; border-radius: 5px; transition: all 0.3s ease; } nav a:hover { background-color: #f5f5f5; } /* Banner Styles */ #banner { background-image: url(https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/2cfdf03d7ae8b8c4b9eef46d3a53c54d.jpg?thumb=1&w=1920&h=408&f=webp&q=90); background-position: center; background-size: cover; height: 600px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: #fff; } #banner h1 { font-size: 60px; margin-bottom: 20px; } #banner p { font-size: 24px; margin-bottom: 30px; } .button { padding: 10px 30px; background-color: #ff6700; color: #fff; border-radius: 5px; transition: all 0.3s ease; } .button:hover { background-color: #ff5500; cursor: pointer; } /* Products Styles */ #products { max-width: 1200px; margin: 100px auto; display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 50px; } .product img { width: 100%; height: auto; } .product h3 { font-size: 24px; margin: 20px 0; } .product p { font-size: 16px; margin-bottom: 20px; } .product a { padding: 10px 20px; background-color: #f5f5f5; color: #333; border-radius: 5px; transition: all 0.3s ease; } .product a:hover { background-color: #ddd; cursor: pointer; } /* Footer Styles */ footer { background-color: #f5f5f5; padding: 20px; text-align: center; } ``` 你可以将上述代码复制到一个HTMLCSS文件中,然后在浏览器中打开HTML文件,就可以看到一个简单的小米官网页面了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值