2

我在那边需要一点帮助。在这里,我需要从 fancybox iframe http://squaretwo.ru/pashokk中删除白色边框。

您可以通过单击红色按钮调用 fancyBox。我已经阅读了以前的文章,但无法解决问题。有任何想法吗?

4

2 回答 2

6

调用花式框脚本时,您还可以将 padding:0 设置为选项。在你的 javascript 中:

jQuery(document).ready(function($) {
    $("a.fancybox").fancybox({
         padding: 0
    });
});

你去那里没有填充。

于 2016-03-08T23:07:27.283 回答
4

您可以通过将其添加到样式表来删除它。

你的 iFrame 的结构是这样的,

<body style="overflow-x: hidden; ">
    <div style="max-width:550px; border: solid 15px #cc0033;" border="1">
       .
       .
       .
    </div>
</body>

所以你可以像这样删除边框,

body div:first-child {
    border: 0 !important;
}

但是,这将影响您为您的 提供的任何边框属性#header,因为这也是 a div:first-child

!important为您的div#header边框属性做一个(如果需要)。

编辑

既然你想摆脱花哨的背景。

你需要添加这个,

.fancybox-skin {
    background: transparent;
    box-shadow: none !important;
}

这是插件生成的默认类。

还,

添加以下内容

html{
  background: white;
}

如果您只想要红色边框内的背景,则不要添加上面的htmlcss,添加以下内容。

body div:first-child {
     background: white !important;
}
于 2012-08-24T08:31:17.523 回答