jquery - Border Radius 上 Fancybox 的白色 Angular

标签 jquery html css fancybox

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

我的 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>

最佳答案

它们来自应用于 .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

关于jquery - Border Radius 上 Fancybox 的白色 Angular ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19622355/

相关文章:

jquery - 如何为移动应用程序创建可滚动的照片流

javascript - 如何将纯 JS 代码转换为 jQuery?

jquery - 滚动按钮

jquery - 如何用 jQuery 直观地模拟单击按钮

html - 数据句 HTML/CSS 中的居中文本

html - 侧面有两个流体柱,宽度为 :auto for the middle column

javascript - 如何以通用样式排列文本框

javascript - 内容超出页面底部的页脚

html - 具有相对定位的 CSS div 在 IE 中无法正常工作

javascript - 单击链接时显示/隐藏 Div