• <legend id='E6owO'><style id='E6owO'><dir id='E6owO'><q id='E6owO'></q></dir></style></legend>
      <tfoot id='E6owO'></tfoot>

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

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

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

        IE选择悬停问题

        IE select issue with hover(IE选择悬停问题)

            <tfoot id='Eg8r2'></tfoot>

            1. <small id='Eg8r2'></small><noframes id='Eg8r2'>

              <legend id='Eg8r2'><style id='Eg8r2'><dir id='Eg8r2'><q id='Eg8r2'></q></dir></style></legend>
                <tbody id='Eg8r2'></tbody>
              • <bdo id='Eg8r2'></bdo><ul id='Eg8r2'></ul>
                • <i id='Eg8r2'><tr id='Eg8r2'><dt id='Eg8r2'><q id='Eg8r2'><span id='Eg8r2'><b id='Eg8r2'><form id='Eg8r2'><ins id='Eg8r2'></ins><ul id='Eg8r2'></ul><sub id='Eg8r2'></sub></form><legend id='Eg8r2'></legend><bdo id='Eg8r2'><pre id='Eg8r2'><center id='Eg8r2'></center></pre></bdo></b><th id='Eg8r2'></th></span></q></dt></tr></i><div id='Eg8r2'><tfoot id='Eg8r2'></tfoot><dl id='Eg8r2'><fieldset id='Eg8r2'></fieldset></dl></div>
                • 本文介绍了IE选择悬停问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我和一个朋友正在尝试解决 IE (7/8).我们在这里建立了一个规范的例子:

                  A friend and myself are trying to workaround IE (7/8). We have built a canonical example here:

                  http://www.mathgladiator.com/分享/ie-select-bug-hover-css-menus.htm

                  使用 CSS 菜单,我们希望在其中进行选择.但是,在 IE 中,当您与选择框交互时,菜单就会消失.我们认为这与选择如何影响事件的错误有关.

                  Using a CSS menu, we would like to have selects in them. However, in IE, the menu goes away when you interact with the select box. We believe this has to do with a bug in how selects affect events.

                  有解决方法吗?至少使用纯 CSS 或 DOM hack?

                  Is there a workaround? At least with pure CSS or DOM hacks?

                  推荐答案

                  我不认为有一个纯 CSS 的方式来解决这个问题.这是由于 IE 在选择元素上处理事件的方式存在一个非常常见的错误.

                  I do not think there is a pure CSS way around this. This is due to a very common bug to the way IE handles events on select elements.

                  您可以使用 Javascript 解决它:

                  You can however work around it with Javascript:

                  <script type="text/javascript">
                      $(document).ready(function () {
                          $('.nav_element a').mouseover(function() {
                              $('.submenu').hide();
                              $(this).parent().find('.submenu').show();
                          });
                  
                          $('.submenu').mouseover(function() {
                              $(this).show();
                          });
                  
                          $('.submenu').mouseout(function (e) {
                              // Do not close if going over to a select element
                              if (e.target.tagName.toLowerCase() == 'select') return;
                              $(this).hide();
                          });
                  
                      });    
                  </script>
                  

                  上面的代码使用了jQuery.

                  The code above uses jQuery.

                  这篇关于IE选择悬停问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的区别?)

                      <tbody id='m1znj'></tbody>

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

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

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

                          <legend id='m1znj'><style id='m1znj'><dir id='m1znj'><q id='m1znj'></q></dir></style></legend>