css小米商城

代码

<!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;

            box-sizing: border-box;
        }

        li {
            list-style: none;
        }

        a {
            text-decoration: none;
        }

        input {
            outline: none;
        }

        .container {
            width: 1226px;
            margin: 0 auto;
        }

        .header .left img {
            width: 56px;
            height: 56px;
        }

        .head {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .head .mid ul {
            display: flex;
        }

        .head .mid ul li {
            margin-right: 30px;
        }

        .head .mid ul a {
            color: #757575;
        }

        .head .mid ul a:hover {
            color: orange;
        }

        .head .right {
            position: relative;
        }

        .head .right input {
            width: 245px;
            height: 40px;
            border: 1px solid #757575;
            border-radius: 5px;
        }

        .head .right span {
            display: inline-block;
            width: 52px;
            height: 40px;
            line-height: 40px;
            position: absolute;
            right: 0;
        }


        /* banner */
        .banner {
            position: relative;
            margin-top: 20px;
        }

        .nav {
            position: absolute;
            top: 0;
            left: 0;
        }

        .nav ul {
            background-color: rgba(105, 101, 101, .6);
            width: 234px;
            height: 460px;
            font: 18px/1.5 Helvetica Neue, Helvetica, Arial, Microsoft Yahei, Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif;
            padding: 20px 0px;
        }

        .nav ul li {
            display: flex;
            justify-content: space-between;
            padding: 0px 30px;

        }

        .nav ul li a {
            display: inline-block;
            width: 234px;
            height: 42px;
            line-height: 42px;

            color: aliceblue;
        }

        .nav ul li:hover {
            background-color: orange;

        }

        .banner i {
            display: inline-block;
            width: 41px;
            height: 69px;
            font-size: 30px;

        }

        .a {
            position: absolute;
            top: 50%;
            margin-top: -33.5px;
            left: 240px;
        }

        .b {
            position: absolute;
            top: 50%;
            margin-top: -33.5px;
            right: 0;

        }

        .banner .circle {
            width: 200px;
            position: absolute;
            right: 15px;
            bottom: 15px;
        }

        .banner .circle span {
            display: inline-block;
            width: 10px;
            height: 10px;
            background-color: pink;
            border-radius: 50%;


        }

        /* banner end */
    </style>
</head>

<body>
    <div class="header">
        <div class="container  head">
            <div class="left"><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi.com-assets/shop/img/logo-mi2.png"
                    alt=""></div>
            <div class="mid">
                <ul>
                    <li><a href="#">Xiaomi手机</a></li>
                    <li><a href="#">Redmi手机</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>
                    <li><a href="#">服务中心</a></li>
                    <li><a href="#">社区</a></li>


                </ul>
            </div>
            <div class="right">
                <input type="text">
                <span>搜索</span>
            </div>
        </div>
    </div>
    <div class="banner container">
        <img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/0942f8338bc19a2cde9394479fc123c8.jpg?thumb=1&w=1226&h=460&f=webp&q=90"
            alt="">
        <div class="nav">
            <ul>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
                <li>
                    <a href="#">
                        电器商品
                    </a>
                    <span>></span>
                </li>
            </ul>
        </div>
        <i class="a"> &lt;</i>
        <i class="b">&gt;</i>
        <div class="circle">
            <span></span>
            <span></span>
            <span></span>
            <span></span>

        </div>


    </div>



</body>

</html>

结果

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜深邃星如尘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值