Web前端 小米官网试做

样品

代码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .top{
            height: 40px;
            line-height: 40px;
            background-color: rgb(69, 68, 68);
        }
        .top-left{
            float: left;
            padding-left: 200px;
            height: 40px;
            line-height: 40px;
        }
        .a1{
            font-size: 12px;
            text-decoration:none;
            color: rgb(184, 184, 184);
        }
        .a2{
            margin: 0.3em;
        }
        .top-right{
            float: right;
            padding-right: 200px;
            height: 40px;
            line-height: 40px;
        }
        .head{
            height: 100px;
            line-height: 100px;
        }
        .p1{
            float: left;
            padding-top: 22px;
            width: 56px;
            height: 56px;
        }
        .b1{
            font-size: large;
            text-decoration: none;
            color: black;
        }
        .b2{
            margin: 0.5em;
        }
        .p2{
            float: right;
            padding-top: 22px;
            width: 52px;
            height: 50px;
        }
        .b3{
            padding-top: 8px;
            width: 250px;
            height: 50px;
        }
        .head-left{
            float: left;
            padding-left: 200px;
            height: 100px;
            line-height: 100px;
        }
        .head-right{
            float: right;
            padding-right: 200px;
            height: 100px;
            line-height: 100px;
        }
        .body-left{
            float: left;
            margin-left: 200px;
            width: 234px;
            height: 460px;
            background-color: gray;
        }
        .c1{
            padding-top: 20px;
            list-style: none;
        }
        .c2{
            margin-left: 20px;
            width: 234px;
            height: 42px;
        }
        .c1 li{
            color: white;
        }
        .body-right{
            float: right;
            padding-right: 200px;
            width: 1056.6px;
            height: 460px;
        }
        .p3{
            width: 1056.6px;
            height: 460px;
        }
        .foot-left{
            float: left;
            padding-top: 20px;
            padding-left: 200px;
            width: 234px;
            height: 170px;
        }
        .p4{
            width: 234px;
            height: 170px;
        }
        .foot-right{
            float: right;
            padding-top: 20px;
            padding-right: 200px;
            width: 1000px;
            height: 170px;
        }
        .d1{
            margin: 10px;
        }
        .p5{
            width: 316px;
            height: 170px;
        }
    </style>
</head>
<body>
    <div class="top">
        <div class="top-left">
         <a href="#" class="a1">小米官网</a>
         <span class="a2"></span>
         <a href="#" class="a1">小米商城</a>
         <span class="a2"></span>
         <a href="#" class="a1">小米澎湃OS</a>
         <span class="a2"></span>
         <a href="#" class="a1">loT</a>
         <span class="a2"></span>
         <a href="#" class="a1">云服务</a>
         <span class="a2"></span>
         <a href="#" class="a1">天星数科</a>
         <span class="a2"></span>
         <a href="#" class="a1">有品</a>
         <span class="a2"></span>
         <a href="#" class="a1">小爱开发平台</a>
         <span class="a2"></span>
         <a href="#" class="a1">资质证照</a>
         <span class="a2"></span>
         <a href="#" class="a1">协议规则</a>
         <span class="a2"></span>
         <a href="#" class="a1">下载app</a>
         <span class="a2"></span>
         <a href="#" class="a1">Select Location</a>
        </div>
        <div class="top-right">
            <a href="#" class="a1">登录</a>
            <span class="a2"></span>
            <a href="#" class="a1">注册</a>
            <span class="a2"></span>
            <a href="#" class="a1">消息通知</a>
        </div>
    </div>
    <div class="head">
        <div class="head-left">
            <img src="./小米图标.png" class="p1">
            <span class="b2"></span>
            <span class="b2"></span>
            <a href="#" class="b1">Xiaomi手机</a>
            <span class="b2"></span>
            <a href="#" class="b1">Redmi手机</a>
            <span class="b2"></span>
            <a href="#" class="b1">电视</a>
            <span class="b2"></span>
            <a href="#" class="b1">笔记本</a>
            <span class="b2"></span>
            <a href="#" class="b1">平板</a>
            <span class="b2"></span>
            <a href="#" class="b1">家电</a>
            <span class="b2"></span>
            <a href="#" class="b1">路由器</a>
            <span class="b2"></span>
            <a href="#" class="b1">服务中心</a>
            <span class="b2"></span>
            <a href="#" class="b1">社区</a>
        </div>
        <div class="head-right">
            <input type="search" class="b3" placeholder="电视">
            <img src="./搜索标.png" class="p2">
        </div>
    </div>
    <div class="body">
        <div class="body-left">
            <ul class="c1">
                <div class="c2"><li>手机</li></div>
                <div class="c2"><li>电视</li></div>
                <div class="c2"><li>家电</li></div>
                <div class="c2"><li>笔记本 平板</li></div>
                <div class="c2"><li>出行 穿戴</li></div>
                <div class="c2"><li>耳机 音响</li></div>
                <div class="c2"><li>健康 儿童</li></div>
                <div class="c2"><li>生活 箱包</li></div>
                <div class="c2"><li>智能 路由器</li></div>
                <div class="c2"><li>电源 配件</li></div>
            </ul>
        </div>
        <div class="body-right">
            <img src="./照片1.png" class="p3">
        </div>
    </div>
    <div class="foot">
        <div class="foot-left">
            <img src="./照片2.png" class="p4">
        </div>
        <div class="foot-right">
            <img src="./照片3.png" class="p5">
            <span class="d1"></span>
            <img src="./照片4.jpg" class="p5">
            <span class="d1"></span>
            <img src="./照片5.png" class="p5">
        </div>
    </div>
</body>
</html>

成品

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值