1

我想让 Fancybox 的背景颜色透明。

显而易见的方法是在你的 CSS 中使用“.fancybox-skin”,但这会影响所有的花式框,我需要它来改变。因此需要使用 wrapCSS 发送设置。

Fancybox有一个参数“wrapCSS”,可以通过原始js调用传入,但我不知道如何使用它。它只是说“字符串”: http: //fancyapps.com/fancybox/#useful

我一直在尝试传递 CSS {wrapCSS: "background: red"},但它不起作用。

4

2 回答 2

3

使用 wrapCSS 添加一个类,然后在你的 CSS 中:

.whateverYouChooseforWrapCSS .fancybox-skin {
  background: none;
}
于 2012-11-05T00:16:57.000 回答
1

为 bg 使用 css:

#fancy_bg
{
    background-color:000000 !important;
}
于 2016-02-02T15:10:17.017 回答