0

是否可以两者兼得:

  • 在 HTML 中的其他元素上绘制一些东西
  • 不捕获鼠标事件(单击、悬停)

在 IE8 中(实际上是 IE9@IE8 模式)?也许,VML 或一些棘手的行为。

在其他浏览器中我可以使用box-shadow, 但DropShadowBlur过滤 IE 捕获事件。有什么选择吗?

mouseover我知道,我可以捕获事件并重新触发它们,但是/仍然存在问题mouseout

4

1 回答 1

0

看到这个答案:https ://stackoverflow.com/a/11115375/638544

简短版本:在 IE 中,具有背景颜色transparent和渐变的元素不会接收鼠标事件。因此,将其添加到您的 CSS 中:

.ie #overlay {
    background: transparent;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000,endColorstr=#000000)"; /* IE8 */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000,endColorstr=#000000);   /* IE6 & 7 */
    zoom: 1;
}

(当然,您可以使用另一种针对 IE 的background声明方法,您可以将颜色字符串更改为您喜欢的任何值。)

于 2012-08-06T23:32:32.030 回答