Possible? — A div overlay which is completely ignored by mouse events (so that mouse events effect only the div below)

你。 提交于 2019-12-04 03:49:53

It is possible in Firefox 3.6+ thanks to its support for the "pointer-events" property, as explained in this post at Mozilla Hacks:

http://hacks.mozilla.org/2009/12/pointer-events-for-html-in-firefox-3-6/

There may be support in Webkit browsers, as mentioned in this post at CSS-Tricks:

http://css-tricks.com/pointer-events-current-nav/

But not in IE or Opera.

perhaps put the #pageShadow inside the pageMap element?

Make the #pageShadow div only as big as the shadow.

If I understand correctly from the mock up image, the effect you are trying to achieve is that the shadow should only cover the top part of the map.

In your code you are stretching the shadow div all over the map:

#pageShadow { .. min-height: 462px; min-width: 1096px; }

Why not decrease the values so that they cover only the top part:

#pageShadow { .. height: 20px; min-width: 1096px; }

Then you will have pointer access to the iframe.

Szin

I did something similar for my whole page:

        .shadowframe_top{
            margin: 0;
            padding: 0;
            box-shadow: 0px 5px 18px #333;
            -webkit-box-shadow:  0px 5px 18px #333;
            background-color:#F0F0F0;
            width: 100%;
            position: fixed;
            top: -10px;
            height: 10px;
        }
        .shadowframe_left{
            margin: 0;
            padding: 0;
            box-shadow: 0px 5px 18px #333;
            -webkit-box-shadow:  0px 5px 18px #333;
            background-color:#F0F0F0;
            height: 100%;
            position: fixed;
            left: -10px;
            width: 10px;
        }
        .shadowframe_bottom{
            margin: 0;
            padding: 0;
            box-shadow: 0px 5px 18px #333;
            -webkit-box-shadow:  0px 5px 18px #333;
            background-color:#F0F0F0;
            width: 100%;
            position: fixed;
            bottom: -10px;
            height: 10px;
        }
        .shadowframe_right{
            margin: 0;
            padding: 0;
            box-shadow: 0px 5px 18px #333;
            -webkit-box-shadow:  0px 5px 18px #333;
            background-color:#F0F0F0;
            height: 100%;
            position: fixed;
            right: -10px;
            width: 10px;
        }

and in the html simply insert four divs:

    <div class="shadowframe_top"> </div>
    <div class="shadowframe_left"> </div>
    <div class="shadowframe_bottom"> </div>
    <div class="shadowframe_right"> </div>

The trick is that, in my case, the div is outside the page and the shadow catches no clicks.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!