<small id='gCQAR'></small><noframes id='gCQAR'>

  • <tfoot id='gCQAR'></tfoot>

    1. <i id='gCQAR'><tr id='gCQAR'><dt id='gCQAR'><q id='gCQAR'><span id='gCQAR'><b id='gCQAR'><form id='gCQAR'><ins id='gCQAR'></ins><ul id='gCQAR'></ul><sub id='gCQAR'></sub></form><legend id='gCQAR'></legend><bdo id='gCQAR'><pre id='gCQAR'><center id='gCQAR'></center></pre></bdo></b><th id='gCQAR'></th></span></q></dt></tr></i><div id='gCQAR'><tfoot id='gCQAR'></tfoot><dl id='gCQAR'><fieldset id='gCQAR'></fieldset></dl></div>
    2. <legend id='gCQAR'><style id='gCQAR'><dir id='gCQAR'><q id='gCQAR'></q></dir></style></legend>
      • <bdo id='gCQAR'></bdo><ul id='gCQAR'></ul>

        我可以使悬停不可见的元素吗?

        Can I make an element invisible to hovers?(我可以使悬停不可见的元素吗?)
          <tbody id='aRYdb'></tbody>

                <bdo id='aRYdb'></bdo><ul id='aRYdb'></ul>
                <tfoot id='aRYdb'></tfoot>

              • <legend id='aRYdb'><style id='aRYdb'><dir id='aRYdb'><q id='aRYdb'></q></dir></style></legend>

                  <small id='aRYdb'></small><noframes id='aRYdb'>

                  <i id='aRYdb'><tr id='aRYdb'><dt id='aRYdb'><q id='aRYdb'><span id='aRYdb'><b id='aRYdb'><form id='aRYdb'><ins id='aRYdb'></ins><ul id='aRYdb'></ul><sub id='aRYdb'></sub></form><legend id='aRYdb'></legend><bdo id='aRYdb'><pre id='aRYdb'><center id='aRYdb'></center></pre></bdo></b><th id='aRYdb'></th></span></q></dt></tr></i><div id='aRYdb'><tfoot id='aRYdb'></tfoot><dl id='aRYdb'><fieldset id='aRYdb'></fieldset></dl></div>
                  本文介绍了我可以使悬停不可见的元素吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个具有星爆效果的 div(透明 png 背景),我想在它们悬停时覆盖在一系列 imgs 上;我必须使 div 变大以包含图像,但它会妨碍检测图像上的悬停.(我将它们全部作为背景图像,因此它们是通过高分辨率 css 媒体查询加载的)

                  I have a div that has a starburst kind of effect (transparent png background) that I want to overlay on a series of imgs as they are hovered; I have to make the div large to contain the image, but then it gets in the way of detecting the hovers on the images. (I have them all as background images so they're loaded via a high resolution css mediaquery)

                  每个图像"都是一系列元素,现在看起来像这样:

                  Each 'image' is a series of elements looks like this right now:

                  <div class="section">
                      <div class="starburst"></div>
                      <a href="link">
                          div class="image">
                              <div class="non-hover"></div>
                              <div class="hover"></div>
                          </div>
                          <p>Caption</p>
                      </a>
                  </div>
                  

                  JS是这样的

                  $('.section a').hover(
                      function () {
                          $('.speaker .hover').hide();
                          $(this).find('.non-hover').addClass('focus');
                          $(this).find('.hover').stop().show().animate({opacity:1.0}, 1000);
                      },
                      function () {
                          $(this).find('.hover').stop().animate({opacity:0.0}, 0);
                          $(this).find('.non-hover').removeClass('focus');
                      }
                  );
                  

                  我的问题是将 .starbursts 放在哪里,如何处理它们以使它们在前面,它们的 bg 图像位于悬停图像的顶部,但不会妨碍悬停在它们上面.我不确定这是否可能,但希望有办法.让它们分开,因为我想以不同的方式为它们制作动画.

                  My question is where to put the .starbursts, how to deal with them so that they are in front, with their bg image on top of the hovered image, but doesn't get in the way of hovering on them. I'm not sure this is even possible but hoping there's a way. Have them separated because I want to animate them on differently.

                  推荐答案

                  你可以使用 CSS 指针事件 属性:

                  You can use the CSS pointer-events property:

                  CSS 属性 pointer-events 允许作者控制特定图形元素在什么情况下(如果有)可以成为鼠标事件的目标.

                  The CSS property pointer-events allows authors to control under what circumstances (if any) a particular graphic element can become the target of mouse events.

                  .starbursts {
                     pointer-events: none
                  }
                  

                  这篇关于我可以使悬停不可见的元素吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Move link image 5px up on hover(悬停时将链接图像向上移动 5px)
                  How do I inspect CSS pseudo classes with firebug?(如何使用 firebug 检查 CSS 伪类?)
                  Why doesn#39;t CSS hover work on table rows when the cells inside the rows have class names?(当行内的单元格具有类名时,为什么 CSS 悬停在表格行上不起作用?)
                  Hover image - display div over it(悬停图像 - 在其上显示 div)
                  How to apply a CSS class on hover to dynamically generated submit buttons?(如何在悬停时将 CSS 类应用于动态生成的提交按钮?)
                  Differences between CSS3 :hover and :focus?(CSS3 :hover 和 :focus 的区别?)

                    <tfoot id='jodiV'></tfoot>

                      • <bdo id='jodiV'></bdo><ul id='jodiV'></ul>

                        <small id='jodiV'></small><noframes id='jodiV'>

                          <tbody id='jodiV'></tbody>
                      • <legend id='jodiV'><style id='jodiV'><dir id='jodiV'><q id='jodiV'></q></dir></style></legend>

                        <i id='jodiV'><tr id='jodiV'><dt id='jodiV'><q id='jodiV'><span id='jodiV'><b id='jodiV'><form id='jodiV'><ins id='jodiV'></ins><ul id='jodiV'></ul><sub id='jodiV'></sub></form><legend id='jodiV'></legend><bdo id='jodiV'><pre id='jodiV'><center id='jodiV'></center></pre></bdo></b><th id='jodiV'></th></span></q></dt></tr></i><div id='jodiV'><tfoot id='jodiV'></tfoot><dl id='jodiV'><fieldset id='jodiV'></fieldset></dl></div>