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

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

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

      2. IE 问题:图片上方的透明 div 不会触发 CSS:hover

        时间:2023-11-29
        • <legend id='GV8m8'><style id='GV8m8'><dir id='GV8m8'><q id='GV8m8'></q></dir></style></legend>
              <tbody id='GV8m8'></tbody>

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

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

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

                  本文介绍了IE 问题:图片上方的透明 div 不会触发 CSS:hover的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  问题是:我想使用透明 div 在图像上创建反应区域,但以下代码在 IE 上不起作用(在 Chrome 上测试):divhover_zone"的背景颜色不起作用完全改变.

                  Here is the problem : I want to create reactive zones on a image using transparent div, but the following code doesn't work on IE (tested on Chrome) : the background-color of the div "hover_zone" doesn't change at all.

                  问题是由于背景颜色设置为透明.使用任何有效的颜色,如#FFF,它就可以工作(似乎 IE 认为:它是透明的,它不包含任何东西,我们不要显示它).

                  The problem is due to the background-color set to transparent. Use any valid color like #FFF and it works (it seems IE thinks like: it's transparent, it doesn't contain anything, let's not display it).

                  <html>
                  <body>
                  
                  <style type='text/css'>
                  
                  #hover_zone{
                      background-color:transparent;
                      visibility: visible;
                      position:absolute;
                      width:40px;
                      height:40px;
                      left:10px;
                      top:10px;
                      z-index:1000;
                  }
                  
                  a:hover #hover_zone{
                      background-color:#0C0;
                      visibility: visible;
                  }
                  
                  </style> 
                  
                  <div id="container">
                    <img src="http://ptaff.ca/blogue/wp-content/uploads/noir_black.png" />
                    <a href="#"><div id="hover_zone"></div></a>
                  </div>
                  
                  </body>
                  </html>
                  

                  感谢您的帮助!

                  干杯!

                  推荐答案

                  我遇到了这个确切的问题并用这种样式修复了它:

                  I had this exact problem and fixed it with this style:

                  div#hover-zone { background:transparent url('../images/spacer.gif') 0 0 repeat; }
                  

                  其中 spacer.gif 是一个 1px 的透明 gif.

                  where spacer.gif is a 1px transparent gif.

                  希望这会有所帮助.

                  这篇关于IE 问题:图片上方的透明 div 不会触发 CSS:hover的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 HTML 中,如何在将鼠标悬停在文本上时显示图像? 下一篇:Rails 中的 HTML 标题属性仅显示第一个单词

                  相关文章

                  <tfoot id='VdfFe'></tfoot>
                  1. <legend id='VdfFe'><style id='VdfFe'><dir id='VdfFe'><q id='VdfFe'></q></dir></style></legend>
                  2. <small id='VdfFe'></small><noframes id='VdfFe'>

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

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