百度糯米购物信息导航.

这是一个关于网页购物导航栏的HTML代码示例,展示了如何使用CSS和JavaScript创建一个固定在右侧的导航栏,包括购物车、我的关注、我的足迹和我的消息等四个功能模块。当鼠标悬停在图标上时,会出现相应的文字描述并伴随动画效果。
摘要由CSDN通过智能技术生成
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>百度糯米购物信息导航</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        div{
            margin: 0 auto;
            position: relative;
        }
        img{
            width: 100%;
        }
        ul{
            position: fixed;
            right: 0;
            top: 40%;
            list-style: none;
        }
        li{
            position: relative;
            margin-bottom: 4px;
        }
        a{
            width: 36px;
            height: 36px;
            display: block;
            line-height: 36px;
            background: #414141;
            border-radius: 4px 0 0 4px;
        }
        span{
            position: absolute;
            top: 0;
            background: #414141;
            width: 50px;
            height: 36px;
            line-height: 36px;
            padding: 0 20px;
            font-size: 12px;
            color: #fff;
            border-radius: 4px 0 0 4px;
          	opacity: 0;
        }
            .a{
                background: #414141 url("image/toolbar_05.png") center no-repeat;
            }
            .b{
                background: #414141 url("image/toolbar_10.png") center no-repeat;
            }
            .c{
                background: #414141 url("image/toolbar_15.png") center no-repeat;
            }
            .d{
                background: #414141 url("image/toolbar_19.png") center no-repeat;
            }
            li:hover span{
                background: #C84D49;
                animation: move 0.2s linear both;
            }
            li:hover a{
                background-color: #bb1914;
                border-radius: 0;
            }
            @keyframes move{
                0% {
                	display: none;
                    left: 0;
                }
                100% {
                    opacity: 1;
                    left: -90px;
                }
            }
</style>
</head>
<body>
    <div>
        <img src="image/img.bmp">
        <ul>
            <li>
                <a href="#" class="a"></a>
                <span>购物车</span>
            </li>
            <li>
                <a href="#" class="b"></a>
                <span>我的关注</span>
            </li>
            <li>
                <a href="#" class="c"></a>
                <span>我的足迹</span>
            </li>
            <li>
                <a href="#" class="d"></a>
                <span>我的消息</span>
            </li>
        </ul>
    </div>
</body>
</html>

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

四维空间中的未知点

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

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

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

打赏作者

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

抵扣说明:

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

余额充值