如何更改fancybox的边框颜色

问题描述:

我一直在尝试将fancybox的边框颜色从白色更改.我已经成功地瞄准了fancybox的除边框以外的所有部分.我如何更改自动装订盒边框的颜色?

I've been trying to change fancybox's border color from white. I've succeeded in targeting every part of fancybox except the border. How can I change the color of the fancybox border?

如果您使用的是1.3.4,则边框位于#fancybox-content css规则中.快速的Firebug或devtools检查将告诉您.

If you're using 1.3.4, the border is in #fancybox-content css rule. A quick firebug or devtools inspect will tell you that.

更新 [2015年3月]:

UPDATE [March 2015] for both versions:

对于Fancybox v1.3.4

For Fancybox v1.3.4

<style type="text/css">
#fancybox-content {
 border-color: #FF0000 !important; /* or whatever */
}
</style>

JSFIDDLE

JSFIDDLE

对于Fancybox v2. 0 .x

For Fancybox v2.0.x

<style type="text/css">
.fancybox-outer {
 background-color: #FF0000; /* or whatever */
}
</style>

对于Fancybox v2. 1 .x

For Fancybox v2.1.x

<style type="text/css">
.fancybox-skin {
 background-color: #FF0000 !important; /* or whatever */
}
</style>

JSFIDDLE

JSFIDDLE

通知:fancybox v2.0.x v2.1.x 之间的区别

Notice the difference between fancybox v2.0.x and v2.1.x