我在花式盒子 http://jsfiddle.net/LF27m/2/上应用边框半径,当我设置边框半径时,它会在花式盒子上创建白色角。 我不知道如何删除它。
我的 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 CODE 是:
<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
添加到您的花式盒子脚本中
$(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