Webアプリケーションにポップアップウィンドウを作成し、jQueryを使用して、特定の場所がクリックされたときにウィンドウをフェードインおよびフェードアウトさせました。私が少し作業した具体的な機能の1つは、ボックス自体ではなく背景をクリックすると、アプリケーションが閉じることです。
$("#fixedHoverBg").click(function(e){
    if(e.target == this)
    {
        $("#fixedHoverBg").fadeOut("slow");
    }
});
これは、ポップアップボックスの上または下のいずれかで背景がクリックされた場合にうまく機能しますが、ポップアップボックスの左または右ではクリックされません。不思議なことに、ボックスの周囲にはコンテナがないため、背景のクリックを妨げる別の要素になることはできません。
HTMLでのdivの構造は次のとおりです。
<div id='fixedHoverBg'>
<center>
    <div id='selectorWindow'>
        <!-- Content in here -->
    </div>
</center>
Css:
#fixedHoverBg {
    position: fixed;
    background - color: rgba(255, 255, 255, 0.85);
    z - index: 200000;
    width: 100 % ;
    height: 100 % ;
    top: 0;
    left: 0;
    display: none;
}
#selectorWindow {
    width: 730px;
    height: 600px;
    background: radial - gradient(ellipseatcenter, rgba(87, 179, 237, 1) 0 100 % ;
    filter: progid: DXImageTransform.Microsoft.gradient(startColorstr = '#57b3ed', endColorstr = '#328ee0', GradientType = 1);
    margin - top: 90px;
    border: 5px solid#ffae43;
    box - shadow: 0 0 0 6px white,
    0 0 20px 5px rgba(0, 0, 0, 0.4);
    border - radius: 5px;
    position: relative;
    display: block;
}
奇妙なことに、クリックのこの奇妙な妨害の原因がわからないようです。