0

我在 Fancybox http://jsfiddle.net/LF27m/2/上应用边框半径,当我设置边框半径时,它会在 Fancybox 上创建白色角。我不知道如何删除它。

我的CSS代码是:

#a1 div.popup-container{
height:350px;
width:400px;
background:#88B3D1;
-moz-border-radius:30px 30px 30px 30px; 
border-radius:30px 30px 30px 30px; 
-webkit-border-radius: 30px 30px 30px 30px;
overflow: hidden;
}

我的 HTML 代码是:

<div id="a1">
    <div class="popup-container">
        <div class="image-container">
            <img src="AllureFree Logo.gif" alt="Smiley face" width="130" height="130"/>
        </div>
        </br>
        <div>
            <h2 style="text-align:center; color:white;"> You must be 18 to shop on our Website.</h2>
            <h2 style="text-align:center; color:white;"> Please verify your birthdate.</h2>
        </div>
</div
</div>
4

1 回答 1

1

它们来自应用于选择器的样式.fancybox-skin(fancybox css 文件)。您可以覆盖自定义 css 文件中的默认值,例如:

.fancybox-skin {
    background-color: transparent;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0) !important;
}

还可以添加padding: 0到您的 fancybox 脚本中

$(document).ready(function () {
    $('html').append('<a class="fancybox" style="display:none" href="#a1"></a>');
    $('.fancybox').fancybox({
        padding: 0,
        afterClose: function () {
            $('a[href="#a1"]').remove();
        }
    });
    $('a[href="#a1"]').trigger('click');
});

JSFIDDLE

于 2013-10-27T23:02:39.753 回答