0

我正在尝试实现悬停javascript,因此一旦鼠标悬停在图像上,项目标题就会出现

http://www.dawaf.co.uk/jj/

目前它似乎显示项目标题而不是它下面的图像

我错过了什么重要的东西吗?

<script type="text/javascript" src="/jj/wp-content/themes/child/scripts/modernizr-2.5.3.min.js"></script>
<script type="text/javascript" src="/jj/wp-content/themes/child/scripts/plugins.js"></script>
<script type="text/javascript" src="/jj/wp-content/themes/child/scripts/script.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
</head>

<body>

  <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->

<!-- portfolio-catcher -->
<div id="portfolio-catcher">
</div>
<!-- .portfolio-catcher -->

  <header>
    <!-- container -->
    <div class="container">

        <nav id="local">
            <a rel="nofollow" href="#portfolio">Portfolio</a>&nbsp;|&nbsp;
            <a rel="nofollow" href="#contact">Contact</a>
        </nav>

        <h1><a href="#portfolio"><img src="/assets/img/hattie-newman.png" alt="Hattie Newman" /></a></h1>

        <nav id="external">
            <a href="//hattienewman.tumblr.com" target="_blank">News</a>&nbsp;|&nbsp;
            <a href="//twitter.com/hattienewman" target="_blank">Twitter</a>
        </nav>
        <div class="clearfix"></div>

    </div>
    <!-- .container -->

  </header>
4

1 回答 1

0

在每个组中的标签之前出现的标签内height<span><p>设置为与元素相同的高度。将其高度设置为零将显示以下内容。悬停似乎工作正常。如果您希望彩色样本完全覆盖图像,则可以完全删除。<hgroup><li><hgroup><span><img><p>

来自萤火虫:

<li data-src="http://www.hattienewman.co.uk/images/uploads/madameproject.jpg" style="height: 393px; position: absolute; top: 0px; left: 652px;" class="masonry-brick">
    <p>                 
        <span style="width:308px;height:393px;background:#41bba1" class="cover"></span> 
    </p>
    <hgroup data-project="projects/view/madame-magazine" style="width: 308px; height: 393px; background: none repeat scroll 0% 0% rgb(65, 187, 161); opacity: 0;">
        <div>
            <h3>Editorial</h3>
            <p>                         
                <span class="dash">&mdash;</span>
            </p>
            <p>Madame Magazine</p>
            <p></p>
        </div>
    </hgroup>
    <img alt="xxxxxx" src="http://www.hattienewman.co.uk/images/uploads/madameproject.jpg?Thu Jul 26 2012 01:49:23 GMT+0530 (India Standard Time)">
</li>
于 2012-07-25T20:34:15.497 回答