bianweiall 2014-12-21 04:11 采纳率: 0%
浏览 2035

ie6下兼容li:hover 使用csshover3.htc没有反应,代码哪里有问题?

1. 想知道为什么没有反应呢?代码哪里有问题吗?
2. 下面代码中:hover后面跟的div.pop这个选择器怎么用?
    .top ul.left li.follow:hover div.pop {
           display: block;
    }
  <!DOCTYPE HTML>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>demo</title>
    <meta name="Keywords" content="" />
    <meta name="Description" content="" />
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <![endif]-->
    <style>
        body,
        ul,
        p {
            margin: 0;
            padding: 0;
        }
        body {
            font-size: 12px;
            behavior: url("http://git.oschina.net/bianweiall/jquery/raw/master/html/jd/css/csshover.htc");
        }
        ul {
            list-style: none;
        }
        a {
            text-decoration: none;
        }
        .container {
            width: 960px;
            margin: 0 auto;
            padding: 0px 10px;
        }
        .clearfloat {
            clear: both;
            height: 0;
            font-size: 1px;
            line-height: 0px;
        }
        /*header start*/
        .top {
            background-color: #F7F7F7;
            border-bottom: 1px solid #EEEEEE;
        }
        .top ul li {
            height: 30px;
            line-height: 30px;
        }
        .top ul li a {
            color: #666;
        }
        .top ul li a:hover {
            color: #E4393C;
            text-decoration: underline;
        }
        /*ul.left start*/
        .top ul.left {
            float: left;
        }
        .top ul.left li {
            height: 30px;
            line-height: 30px;
            margin-right: 18px;
            float: left;
            color: #666;
        }
        .top ul.left li span {
            margin-right: 5px;
            display: block;
            background-repeat: no-repeat;
            float: left;
        }
        .top ul.left li.follow {
            position: relative;
        }
        .top ul.left li.follow div {
            display: none;
            position: absolute;
            width: 116px;
            height: 129px;
            top: 36px;
            left: -50px;
            background-color: #fff;
            border: 1px solid #ddd;
            z-index: 10;
        }
        .top ul.left li.follow div span {
            position: absolute;
            width: 0;
            height: 0;
            left: 48px;
            border-width: 10px;
            border-style: solid;
            _overflow: hidden;
            _border-style: dotted dashed solid dashed;
        }
        .top ul.left li.follow span.arrow1 {
            top: -20px;
            border-color: transparent transparent #ddd transparent;
        }
        .top ul.left li.follow span.arrow2 {
            top: -19px;
            border-color: transparent transparent #fff transparent;
        }
        .top ul.left li.address strong {
            margin-right: 2px;
        }
        .top ul.left li.follow:hover div.pop {
            display: block;
        }
        /*ul.left end*/
    </style>
</head>

<body>
    <div class="header">
        <div class="top">
            <div class="container">
                <ul class="left">
                    <li class="favorites">
                        <a href="#">收藏</a>
                    </li>
                    <li class="follow">
                        <a href="#">关注</a>
                        <div class="pop">
                            <span class="arrow1"></span>
                            <span class="arrow2"></span>
                        </div>
                    </li>
                    <li class="address">
                        <strong>北京</strong><a href="#">[更换]</a>
                    </li>
                </ul>
                <div class="clearfloat"></div>
            </div>
        </div>
    </div>
</body>

</html>
  • 写回答

2条回答 默认 最新

  • 微wx笑 Java领域优质创作者 2014-12-26 14:02
    关注

    因为跨域的问题吧。没这么用过。

    评论

报告相同问题?

悬赏问题

  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?